16

If I have an option, for example AxesStyle, how can I find possible values for it? I know that one of the possible values is Arrowheads, but can I find others? I was looking for lists or something like that but have been unsuccessful so far.

Is there some command like Options[], or ?TicksStyle? I know that these commands are not for this, but just to get a point.

balboa
  • 951
  • 8
  • 20
  • 1
    As indicated in [the documentation](http://reference.wolfram.com/mathematica/ref/Axes.html), for the various `Graphics` functions, `Axes` is either a Boolean or an array of Booleans that indicate which axes are to be included in the given `Graphics` object. –  Jan 03 '12 at 21:40
  • 4
    Currently, it is not possible to find all possible values for a given option. See [this related question](http://stackoverflow.com/q/8625296/616736) and Sjoerd's comments under Prashant's answer. – abcd Jan 03 '12 at 22:11

4 Answers4

5

Sometimes, the possible values for an option are incompletely documented. For example, try to find out what the legal values are for the option Method when used in Plot. The ref page for Plot merely gives the default value for Method and describes it in very general terms. In the Examples section of that page, Method is not even included among the options with examples. And the ref page for Method seems to give no help on this, either. On the latter page there is a link to the guide page Graphics Options And Styling, and on that guide page the item 'Method' appears under category "Tweaking Rendering" -- but again no help on what values might be available!

Szabolcs
  • 24,728
  • 9
  • 85
  • 174
murray
  • 737
  • 2
  • 10
  • 28
3

If you check the help file for the various things you're asking about and click the "More Information" dropdown it will give you all the options.

Edit: To clarify, be sure to check the help file for the specific setting you're looking for, not the function which is using it.

Eli Lansey
  • 1,130
  • 2
  • 15
  • 28
  • thank you, I've seen that. And it gives me all the possible options, and one value for each, but what about others. For example for Plot->FillingStyle-> it's given there Automatic, but how to find out what are the other possible choices? – balboa Jan 03 '12 at 22:06
  • 1
    @balboa - For your example, you could look under Plot - Options - FillingStyle for more information, or look up FillingStyle directly for other examples. That's not comprehensive though. Try here for more examples. – Chris Degnen Jan 03 '12 at 23:08
  • You looked at the options for `Plot`. That shows the default value for `FillingStyle` as used in `Plot`. If you check the help page for `FillingStyle` it will give much more information. For example, the first info piece on that help page says "FillingStyle->g specifies that all filling should be done by default with the specified graphics directive." – Eli Lansey Jan 03 '12 at 23:32
  • Ok, I see it is a bit complicated, and as I understood there is no easy way that mathematica lists options's possible values. I should get familiar with directives. – balboa Jan 04 '12 at 09:27
2

The main places to look for documentation for an option are the documentation pages for the option, and for the function that takes the option. Open up the various sections, starting with More Information, but also including sections like Scope (which frequently has sub-categories.)

When looking at documentation for functions, there is an entire section titled Options that has individual options as a sub-section. So you could look at ListPlot > Examples > Options > Filling which contains quite a lot.

When looking at documentation for options, especially for graphics functions, the examples may just show how you can use the option with a representative function, such as Plot. Usually similar functions like ListPlot, LogPlot, etc... will accept similar settings for the option.

Brett Champion
  • 8,497
  • 1
  • 27
  • 44
1

As you indicated in the questions you can use Options to see what is available.

So,

Options[Plot]

Returns,

{AlignmentPoint -> Center, AspectRatio -> 1/GoldenRatio, Axes -> True,
AxesLabel -> None, AxesOrigin -> Automatic, AxesStyle -> {}, 
Background -> None, BaselinePosition -> Automatic, BaseStyle -> {}, 
ClippingStyle -> None, ColorFunction -> Automatic, 
ColorFunctionScaling -> True, ColorOutput -> Automatic, 
ContentSelectable -> Automatic, CoordinatesToolOptions -> Automatic, 
DisplayFunction :> $DisplayFunction, Epilog -> {}, 
Evaluated -> Automatic, EvaluationMonitor -> None, 
Exclusions -> Automatic, ExclusionsStyle -> None, Filling -> None, 
FillingStyle -> Automatic, FormatType :> TraditionalForm, 
Frame -> False, FrameLabel -> None, FrameStyle -> {}, 
FrameTicks -> Automatic, FrameTicksStyle -> {}, GridLines -> None, 
GridLinesStyle -> {}, ImageMargins -> 0., ImagePadding -> All, 
ImageSize -> Automatic, ImageSizeRaw -> Automatic, LabelStyle -> {}, 
MaxRecursion -> Automatic, Mesh -> None, MeshFunctions -> {#1 &}, 
MeshShading -> None, MeshStyle -> Automatic, Method -> Automatic, 
PerformanceGoal :> $PerformanceGoal, PlotLabel -> None, 
PlotLegends -> None, PlotPoints -> Automatic, 
PlotRange -> {Full, Automatic}, PlotRangeClipping -> True, 
PlotRangePadding -> Automatic, PlotRegion -> Automatic, 
PlotStyle -> Automatic, PlotTheme :> $PlotTheme, 
PreserveImageOptions -> Automatic, Prolog -> {}, 
RegionFunction -> (True &), RotateLabel -> True, 
TargetUnits -> Automatic, Ticks -> Automatic, TicksStyle -> {}, 
WorkingPrecision -> MachinePrecision}
Amal Chaudhuri
  • 151
  • 1
  • 5