Mathematica has a lot of undocumented or poorly documented options.
- How does one go about working out if there is an undocumented option that might solve a particular problem?
- How does one work out what the universe of possible values the option might take are? (This also applies to options whose existence is documented, but where the range of valid values isn't.)
As background, here is a collection of ones I and others have found so far:
Graphics
The Method
option is an option for Graphics
and related commands like BarChart
. It is mentioned in the notes in the documentation and turns up in Options[Graphics]
but is not listed as an option in the documentation with any examples. There are many sub-options, none of which are explicitly documented.
Method -> {"ShrinkWrap" -> True}
removes whitespace that Mathematica adds as a tiny rim to each plot. (pointed out by Sjoerd)Method -> {"GridLinesInFront" -> True}
does what it says (see Brett Champion's answer to this question and this MathGroup thread).Dynamic
GridLines
using this option are present in much of the graphical Wolfram|Alpha output (See, e.g. the edited number line code).Method -> {"AxesInFront" -> True}
also does what it says. (see TomD's comment on Brett's answer)Method -> {Refinement -> {ControlValue -> angle}}
sets the angle that decides when two points in a plot are not further subdivided - default is5\[Degree]
. (see Yaro's answer here and the relevant page in Stan Wagon's book. Also, aPlot
version comparison by Alexey)The option
"MessagesHead"
is used to track the origin of calls toPlot
, etc., made by dependent plot functions such asLogPlot
,LogLinearPlot
, andDateListLogPlot
. This allows the correct options and messages to be passed to and from the general function. An example of its use can be seen in this question.ImageSizeRaw
option for various plotting and graphics functions is not documented, but turns out to be important for embedding CDFs into web pages.PrivateFontOptions -> {"OperatorSubstitution" -> False}
, as documented here, stops minus signs, parentheses and the like from being in Mathematica's special fonts rather than the selected text font.s0rce discovered that the
ScalingFunctions
option works for line plots (ListPlot
,Plot
, etc). Possible values include"Reverse"
,"Log"
"Log10"
– the last of these being itself undocumented.Not strictly a graphics function, but often used to create nice-looking ticks,
FindDivisions
has an undocumentedMethod
option: for example,FindDivisions[{-1.8,8.9}, 6, Method -> "ExtendRange"]
gives the encompassing divisions{-2, 0, 2, 4, 6, 8, 10}
, as doesMethod -> Automatic
; any other setting forMethod
gives the inner divisions:{0, 2, 4, 6, 8}
.You can control the amount a
PieChart
segment pops out of the chart when you click it usingSetOptions[Charting'iSectorChart, {PopoutSpacing -> n}]
, wheren
is numeric. The default is 0.2; for fun, try a negative number. You can suppress this behaviour altogether usingSetOptions[Charting'SectorChart, {Popout -> False}]
(in both these examples, change the quote mark to a backquote).For some
Plot
functions the setting for thePlotStyle
option can be specified as a function as well as a list of graphics directives. The earliest reference for this undocumented feature is this answer by Simon Woods. Additional examples of thisPlotStyle
usage forPlot
andParametricPlot
are: this, this, this, and this.
Panels
As noted in an earlier question, these options pop up in some graphics/panels, but are unrecognised when one uses them explicitly in Panel
, Graphics
or related structures:
LineColor
FrontFaceColor
BackFaceColor
GraphicsColor
Legends
There seem to be a lot of undocumented options here:
AssembleLegendContainer
BubbleScaleLegend
ColorGradientLegend
ContourLegend
CurveLegend
GridLegend
Legend
LegendContainer
:SetOptions[Legending`GridLegend, Legending`LegendContainer -> Identity]
removes the border from legends (thanks to Mr.Wizard)LegendHeading
LegendImage
LegendItemLayout
LegendLayout
LegendPane
LegendPosition
LegendReap
Legends
LegendSize
LegendSow
Equation-solving and minimisation/optimisation
Evaluated -> False
option ofFindRoot
(TomD in comments)
System options for evaluation
Per acl's answer below, SystemOptions[]
reveals many hidden options using the following syntax. These can be set using SetSystemOptions[]
.
"PackedArrayOptions" /. SystemOptions[]
"CompileOptions" /. SystemOptions[]
Although this book by Nancy Blachman has been written for Version 2, it is still not a bad starting point: http://www.amazon.com/Mathematica-Quick-Reference-Version-Spiral/dp/0201628805
Evaluated-> False
option ofFindRoot
, known to me from a MathGroup discussion by Andrzej Kozlowski & szhorvat. See here. They consider the exampleFindRoot[NIntegrate[Exp[a x], {x, 0, 1}] == 2, {a, 1}, Evaluated -> False]
$\endgroup$Legending`LegendContainer
or "MessagesHead"? I argue thatTrace
is still more powerful and applicable. $\endgroup$AxesInFront
but you may want to add this to that list :) $\endgroup$