Questions tagged [options]

Questions dealing with optional named arguments of Mathematica functions.

Filter by
Sorted by
Tagged with
149
votes
6answers
6k views

How can one find undocumented options or option values in Mathematica?

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 ...
93
votes
4answers
7k views

Functions with Options

Suppose you want to create a function which has optional arguments. Maeder's book Programming in Mathematica covers the topic extensively up to version 3, but some things have changed/evolved since ...
73
votes
2answers
4k views

Extract values for ViewMatrix from a Graphics3D

Under More Information in the help page of ViewMatrix the following entry can be found With the setting ...
64
votes
6answers
5k views

How to avoid collision between optional arguments and options

Is it possible to create a function with optional arguments that also takes options? Here is a simple example. I have a function f with option "g". It also has ...
56
votes
3answers
6k views

How to find out which method Mathematica selected?

There are commands like NonlinearModelFit[] or NDSolve[] that have the option Method it ...
41
votes
3answers
21k views

How to change plot style or other options after it was created

For example: p = Plot[Sin[x], {x, 0, 1}] Is it possible to write options in Show to change the curve's color for example into ...
36
votes
1answer
1k views

How to extract a list of available Method-s

The option Methodapplies for several functions, such as NDSolve, FindRoot, ...
33
votes
1answer
493 views

Quickly look-up usages, options and attributes of symbols

When I'm writing code in the front-end, I find myself very often looking up the list of options of a symbol over and over again in the documentation center. In most cases you find there a list of ...
30
votes
2answers
579 views

Chart illustrating options that affect Graphics/Graphics3D objects

In Mathematica there is a seemingly never-ending list of parameters that affect the appearance of Graphics and Graphics3D ...
30
votes
2answers
2k views

Plot Option Precedence while combining Plots with Show[]

I like to build sophisticated plots by combining simpler ones with Show[]. Typically this involves setting non-default Plot-Options with the different Plot-Commands,...
27
votes
1answer
877 views

Publishing results obtained in Mathematica

I've been using Mathematica to solve nonlinear partial differential equations for my doctoral research for the last 2 years or so. I am not an expert in Mathematica or mathematics and I am an engineer ...
26
votes
2answers
751 views

Evaluation of OptionValue[]

I have a function that takes an OptionsPattern and I want to access several options, say a, and ...
25
votes
3answers
739 views

Writing functions with “Method” options

I'd like to implement several behaviors for a particular function using a Method option added to the function definition: ...
24
votes
1answer
479 views

Prompt a set of possible options

Recent versions of Mathematica dynamically prompt a list of possible options. For example, when typing Plot[x, {x,0,1}, PlotStyle-> After typing the arrow, ...
24
votes
1answer
980 views

More Ticks::ticks errors in AbsoluteOptions in v10

Bug introduced in 7.0 or earlier and persisting through 11.3 While the specific bug affecting Plot described in AbsoluteOptions prints error messages in V10 has ...
23
votes
4answers
704 views

SetOptions locally?

Is there a way to SetOptions locally? For example, I have a Module and inside it I am doing a lot of ...
23
votes
5answers
2k views

How to get the real PlotRange using AbsoluteOptions?

Bug persisting through version 12.0.0.0 The problem in general involves the unreliable behaviour of AbsoluteOptions when option values are implicitly specified (e....
21
votes
2answers
448 views

Where is the old option TraceInternal->True?

Already at least in version 2 (I think), the function Solve calls the function Roots. At that time, I had a rather dirty trick, that still works, to verify this: ...
21
votes
4answers
918 views

How can I work out which functions work with SetOptions?

Not all functions seem to work with SetOptions. e.g. ...
20
votes
2answers
9k views

How to save plots in grayscale

As sophomoric as this question seems, how should I save plots in grayscale in Mathematica? I generally like eps images for their scalability and I use ghostscript or other third party perl scripts ...
20
votes
2answers
5k views

Arrows on axes in Plot3D

I use the following code to draw Arrows on Axes in 2D graphics: ...
20
votes
1answer
1k views

New behavior of PlotRange in Mathematica 10

In Mathematica 10, when I plot data that has small changes around some non-zero value, the plot chooses a PlotRange that "collapses" the data so that the variations ...
20
votes
3answers
416 views

Options which require RuleDelayed

For some functions in Mathematica it is important to use RuleDelayed. One prominent example is the EvaluationMonitor for ...
20
votes
1answer
346 views

Why are some option values symbols, other strings?

Is there a rationale, beyond historical accident, why some Mathematica option values are strings, while others are symbols? It seems natural that some value spaces, e.g. named color schemes, are so ...
20
votes
0answers
195 views

Inconsistent handling of Dynamic option values; intended, omission, or bug?

In answering Dynamic ClipPlanes calculated from current ViewPoint Kuba and I got into a brief exchange regarding how Option values wrapped in Dynamic should be ...
19
votes
2answers
549 views

How do I get a list of allowed values for an option?

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 - ...
18
votes
3answers
3k views

Passing down arguments

In R, one can use ... to pass arguments down to another function. For example ...
18
votes
2answers
923 views

Function with custom Options and modified Options for built-in Symbols

I couldn't find a more descriptive title, but I guess an example will explain my problem. I set up some customized Grid function including some additional ...
18
votes
2answers
962 views

Determining the default Method used in optimization and root-finding algorithms

Is it possible to extract the Method which is used in functions like NMinimize, FindRoot, <...
18
votes
2answers
450 views

Clean and handy Options management/filtering

the case I want to be able to create a function with some default options but also without need to add full explicit list of options available for it. And then inside I want to be able to filter ...
17
votes
4answers
4k views

Pass list of options to Plot3D

Consider the example plotOptions = {PlotPoints -> 10, MaxRecursion -> 2} Plot3D[x y , {x, 0, 10}, {y, 0, 10}, plotOptions] Why does this causes the error: ...
17
votes
3answers
442 views

How can I set Grid alignments using numbers?

There is an example in the Alignment documentation (it also appears in the Grid documentation): ...
17
votes
3answers
607 views

Creating a simple Dock Cell that Fades In when Cursor Hover Over It

I like to create dock cells, that enhance the look of my notebooks. Do you know of a simple way to get the functionality in iBooks shown below in the video. I want the dock cell in Mathematica to "...
17
votes
2answers
451 views

Inline documentation of “Properties”

Context I find the documentation has become a bit of a maze, in particular given the more recent convention of having keywords has strings rather than Mathematica Keywords. For instance, ...
17
votes
2answers
464 views

Why doesn't Mathematica use uniform criteria for validating Options?

Plot[Sin[x], {x, 0, 1}, pp -> 0] Gives as expected: Plot::optx: Unknown option pp in Plot[Sin[x],{x,0,1},pp->0]. >> However: ...
17
votes
2answers
1k views

Saving a notebook without output lines

Is it possible to change the way Mathematica saves so that Out[] lines are never included? I have a .nb file that processes a ...
17
votes
2answers
829 views

Method options for DensityPlot and ContourPlot

What Method options are allowed for DensityPlot and ContourPlot? I am unable to find this ...
17
votes
1answer
228 views

Notebook's TaggingRules inherit too much

Bug introduced in V10.4 or earlier and persisting through V11.3 [CASE:3852725] was created [...] I have forwarded an incident report to our developers with the information you provided. [...] ...
17
votes
1answer
464 views

What Method options does FindInstance accept?

While answering Trouble getting FindInstance to return multiple results for certain constraints it became clear that for this problem FindInstance would be better ...
16
votes
4answers
1k views

How to plot a curve with border around the line?

This can be useful if the curve is passing over both dark and light backgrounds (like well-done subtitles in movies).
16
votes
4answers
2k views

How to make a function with its own options as well as passing options to other functions [duplicate]

I have a function with many of its own options, but I would also like to pass options to subfunctions using the FilterRules function. Here's a simple example: <...
16
votes
2answers
715 views

Creating a NearestFunction that returns an index

I use Nearest repeatedly for large data sets. For example pts = RandomReal[{-1, 1}, {1000, 3}]; Nearest[pts, {0, 0, 0}] I ...
16
votes
1answer
2k views

Running an initialization cell on Mathematica start up [duplicate]

I am writing a bash script to run a bunch of Mathematica .nb files serially. So I thought I'd convert my Mathematica cells into ...
16
votes
1answer
758 views

Method -> {“AxesInFront” -> False} for Graphics3D

I'm aware of two ways to manage positioning of Axes for Graphics3D: AxesOrigin and ...
16
votes
1answer
192 views

What are the possible Method option values for plotting functions?

Many plotting functions have a Method options with descriptions like this: Plot: "the method to use for refining curves" ...
16
votes
1answer
3k views

The difference between “SymbolicProcessing” -> 0 and restricting the function definition to numeric values only

The Documentation tells us that there are two ways to disable symbolic processing of the integrand by the NIntegrate function when it is known that it just slows ...
15
votes
3answers
2k views

Number format of axes in a plot

How can I have a conditional format of the values appearing in the axis of a plot ? I have in mind the number format options available in Excel for plots as described here http://peltiertech.com/...
15
votes
3answers
269 views

How to specify custom graph styles for GraphStyle?

There is a way to specify custom themes for plots (Is it possible to define a new PlotTheme?), but themes do not apply to Graph objects, not even to ...
15
votes
2answers
589 views

How do I override options with my own defaults?

I'm calling a function f from within a function g and would like to pass any valid options for ...
15
votes
1answer
379 views

Confused by the opts : OptionsPattern[ ] pattern

I'm trying to make sense of the syntax in the clause opts:OptionsPattern[], as found in this standard "rule-based" (pseudo-)function definition pattern: ...