Message Boards Message Boards

Store all possible options from a dropdown of a parameter ?

When I type a parameter name followed by a right arrow (->), a set of possible options will be displayed on a dropdown.

is it possible to store them in a list?

Example: For PlotTheme->, possible options are:

"Business"
"Detailed"
"Marketing"
"Minimal"
"Monochrome"
"Scientific"
"Web"
"Classic"

I would like to store these options in a List.

Kindly let me know a procedure to do this.

PlotTheme Options Doubt Example

POSTED BY: Manjunath Babu
2 Replies

I see one of the parameters as "FunctionalFrequency". With my understanding, it gives the result based on the user specific machine. This will work for now.

Thank you so much for the quick response. But, I wanted to get all possible options for a particular function parameter.

I never knew about looking into $InstallationDirectory, Thanks again, I will start looking into this hoping to find my desired result.

POSTED BY: Manjunath Babu

One possible way

dir = FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", 
    "SystemResources", "FunctionalFrequency", "OptionValues"}];
file = FileNameJoin[{dir, "Plot.m"}];
opt = (PlotTheme /. ReadList[file])[[1, All, 1]]

gives

{"Web", "Minimal", "Detailed", "Business", "Marketing", 
  "Scientific", "Monochrome", "Classic", "Default"}
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract