When using Mathematica how can I get a list of the allowed values of an option? As an example I can use the Options command as follows -


which gives me a list of available options

(* {Alignment->Automatic,AppearanceElements->Automatic,AutoAction->\
TrackedSymbols->Full,UnsavedVariables:>None,UntrackedVariables:>None} \

I can use Options for a specific parameter, i.e.,

(* {ControlType->Automatic} *)

But this doesn't tell me what the possible allowed values are for this option. Checkbox, Setter etc. Is there a command I can use to find the allowed values of an option?


2 Answers 2


Unfortunately, there is no command which tells you that. There are several reasons for that. First, the possible option values are context dependent. This means, e.g. the option Method can be set to different values depending on whether you use it in NDSolve, FindRoot, etc..

Second, as you see with "Elements" or "ImageList" options of Export, options are not always symbols, but usage messages cannot be applied to strings and documentation to string options rarely exists as separate page.

Therefore, the only way you find out about possible option values is the documentation. Note, that you often have two places to look

  1. You want to know what the special option ControlType of Manipulate does, then you first check out the help page of Manipulate
  2. For general information about the option, if it is a symbol, you check out the help page of the symbol itself.
  • $\begingroup$ Thanks, found the info i needed in the documentation but just wasn't sure if there was a command i could use to get the info i needed, would be good if such a command existed but i can see how this is context dependent. Thanks for answer. $\endgroup$ Commented Feb 13, 2013 at 12:30
  • 2
    $\begingroup$ and it's not always in the docs, either... $\endgroup$
    – acl
    Commented Feb 13, 2013 at 23:56
  • $\begingroup$ Since new version of Mathematica has popup hit menu when mouse over an option, just like this link shows mathematica.stackexchange.com/questions/52406/… So I wonder there must be a database somewhere contains information about available option value for different Functions. But I cannot figure out how to find this $\endgroup$
    – matheorem
    Commented Mar 26, 2017 at 3:06
  • 1
    $\begingroup$ @matheorem Yes, the database is under $InstallationDirectory/SystemFiles/Components/AutoCompletionData/Main/OptionValues/. $\endgroup$
    – halirutan
    Commented Mar 26, 2017 at 3:50
  • $\begingroup$ Wow, amazing! I am really curious about how do you find it? And another problem is that the information in a single file is not complete. For example, there are only three options contained in DensityPlot.m file: MaxRecursion, PlotPoints, PlotTheme. So there must be other files contains the information of relations and hierarchy of different function, so mma can look up option in other related functions' m files. $\endgroup$
    – matheorem
    Commented Mar 26, 2017 at 5:54

What follows is merely @halirutan's answer expressed in Wolfram Language:

Fetch symbol names and options:

symbolNamesWithOption@opt_ :=
Quiet @
  {#1, Options/@Unevaluated/@#2}& @@@
  ({#, ToExpression[#, InputForm, HoldComplete]}&/@Names@"*") // ReleaseHold
, {symbolName_, {___, (opt -> _) | (opt :> _), ___}} :> symbolName]

Assemble names of files to search in:

notebooksToSearchInForInfoOnOption@opt_ :=
FileNameJoin @
{ $InstallationDirectory
, "Documentation", "English"
, "System", "ReferencePages", "Symbols"
, # <> ".nb"}& /@
Prepend[symbolNamesWithOption@opt, ToString@opt]

(could probably be done smarter with a proper use of `Documentation``)

With a basic formatting…

justSomeGrid@optString_String :=
  Prepend[#, Style[#, Bold]& /@
  {"Reference notebook", "Values for "<> optString}]
, Alignment -> Left]&

…show the results:

tableOfExamplesForOption@opt_ :=
With[{optString = ToString@opt}
, { Button[FileBaseName@#1, SystemOpen@#1
    , Appearance -> "Palette", ImageSize -> Automatic]
  , Row[#, ","]& @
    , RowBox[{optString, "\[Rule]", val_}] |
      RowBox[{optString, " ", "\[Rule]", " ", val_}] :>
    , \[Infinity]]}& @@@
    {#, Quiet@Import[#, "NB"]}& /@
  , {_, $Failed}] // justSomeGrid@optString ]

An example:



  • please check symbolNamesWithOption@Method with Quiet omitted from its definition before trying the whole thing. There could be side-effects, and they may be version-dependent. From my experience, it's safe to run on 8.0 but I had to add an use at ou own risk warning
  • pattern for search could be improved
  • some searches are very slow in this implementation (try tableOfExamplesForOption@Method — I personally haven't yet had enough patience to wait for its result)
  • reference notebooks called with buttons will stay at (and thus, may mess with) your recent files history
  • using special contexts in Names one could search in definitions for examples values not covered in documentation
  • symbolNamesWithOption@_String comes as a nice bonus

Still, I hope it adds something to the description in natural language.

Ideas on improvements are very welcome.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.