Tagged Questions

Questions dealing with optional named arguments of Mathematica functions.

5k 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 ...
5k 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 ...
3k 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 ...
4k views

How can I create a function with 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 ...
3k views

How to find out which method Mathematica selected?

There are commands like NonlinearModelFit[] or NDSolve[] that have the option Method it ...
417 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 ...
557 views

How to extract a list of available Method-s

The option Methodapplies for several functions, such as NDSolve, FindRoot, ...
463 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 ...
10k views

Is it possible to change the color of plot in Show?

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 ...
743 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 ...
484 views

Evaluation of OptionValue[]

I have a function that takes an OptionsPattern and I want to access several options, say a, and ...
1k 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,...
1k views

How to get the real PlotRange using AbsoluteOptions?

The problem in general involves the unreliable behaviour of AbsoluteOptions when option values are implicitly specified (e.g. ...
351 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 ...
626 views

How can I work out which functions work with SetOptions?

Not all functions seem to work with SetOptions. e.g. ...
336 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: ...
394 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: ...
362 views

Options which require RuleDelayed

For some functions in Mathematica it is important to use RuleDelayed. One prominent example is the EvaluationMonitor for ...
429 views

More Ticks::ticks errors in AbsoluteOptions in v10

Bug introduced in 7.0 or earlier and persisting through 10.4 or later While the specific bug affecting Plot described in AbsoluteOptions prints error messages in ...
2k views

Arrows on axes in Plot3D

I use the following code to draw Arrows on Axes in 2D graphics: ...
412 views

How can I set Grid alignments using numbers?

There is an example in the Alignment documentation (it also appears in the Grid documentation): ...
6k 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 ...
325 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, ...
381 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: ...
869 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).
507 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 ...
309 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 ...
591 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, <...
230 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, ...
313 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 - ...
103 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 ...
1k 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/...
303 views

How to check the validity of an option value

I have a user-defined function, func, which takes the following form: func[arg1, arg2, options] Here is the actual code ...
822 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 ...
225 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 ...
305 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 ...
1k views

Passing down arguments

In R, one can use ... to pass arguments down to another function. For example ...
1k views

How to remove ticks?

I wanted to remove the Ticks in my coding but i can't. Here when i try to remove the Ticks the number also gone. I need numbers ...
520 views

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

I'm aware of two ways to manage positioning of Axes for Graphics3D: AxesOrigin and ...
679 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: <...
738 views

Factorizing polynomials over fields other than $\mathbb{C}$

I'd like to take a polynomial in $\mathbb{Z}_5[x]$ of the form $ax^2+bx+c$ and factor it into irreducible polynomials. For example: Input... x^2+4 Output... <...
2k 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: ...
405 views

Pass Options to Export[]

I'm working with Options to change the look and feel of some generated Graphics by passing Options to several functions, one of them being Export[]. For example: <...
275 views

Problem using OptionValue with functions defined by SubValues, and the use of Options for function dispatch

I have a function that looks like: ...
559 views

Can Manipulate controls have the option Appearance -> “Labeled” by default?

I was wondering if there's a way to tell Mathematica to use the option Appearance -> "Labeled" for all Manipulate commands by ...
261 views

Unexpected design of protection against dynamic content

Introduction/summary I was surprised by the (from my point of view limited) extent to which the user is defended against "potentially unsafe dynamic content" by default. Two things were unexpected ...
540 views

Dealing with nested options

OptionValue allows for recent versions of Mathematica (I think as from 7) to easily access optional parameters if they are explicitely given to a function or their default values otherwise. For big ...
964 views

About number truncation of ticks display in ListPlot

In my problem, I need to plot a figure in a relatively small region of the $x$ axis, e.g., ...