Questions tagged [options]

Questions dealing with optional named arguments of Mathematica functions.

Filter by
Sorted by
Tagged with
31
votes
2answers
3k 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,...
76
votes
2answers
5k 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 ...
94
votes
4answers
8k 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 ...
27
votes
5answers
2k views

How to get the real PlotRange using AbsoluteOptions?

Bug persisting through version 12.2.0.0 The problem in general involves the unreliable behaviour of AbsoluteOptions when option values are implicitly specified (e....
48
votes
3answers
25k 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 ...
161
votes
6answers
7k 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 ...
68
votes
6answers
6k 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 ...
58
votes
3answers
7k views

How to find out which method Mathematica selected?

There are commands like NonlinearModelFit[] or NDSolve[] that have the option Method it ...
26
votes
1answer
616 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, ...
25
votes
1answer
1k 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 ...
24
votes
5answers
1k views

How can I work out which functions work with SetOptions?

Not all functions seem to work with SetOptions. e.g. ...
11
votes
1answer
325 views

Programming scripts to create and modify stylesheets: problems with contexts

I am trying to emulate the shift and shift+tab feature in the Outline.nb stylesheet that comes with Mathematica. I added the following code to a private ...
27
votes
2answers
856 views

Evaluation of OptionValue[]

I have a function that takes an OptionsPattern and I want to access several options, say a, and ...
13
votes
1answer
7k views

Fixed color scale in multiple density plots

I think there should be a simple solution for my current problem, but neither StackOverflow (or the help of Mathematica) or Google have it. I have to plot multiple density plots with a color function....
11
votes
2answers
385 views

Setting options of expressions similar to using SetOptions on objects

Introduction I often have the problem that in an expression, I want to change an option. If we are sure the option is not present, we could simply use ...
4
votes
1answer
865 views

Change the height of a function being plotted

How do I alter the height of any function plot using the Plot function? Mathematica seems to limit the height of the plot up to the range of a function and distort ...
18
votes
2answers
1k 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, <...
20
votes
2answers
1k 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 ...
11
votes
4answers
808 views

Set the style of a cell

I know it's possible to programmatically change options on the selection in a notebook. I'd like to create a button that lets me change the style of a cell. It's a style that doesn't have a keyboard ...
14
votes
2answers
9k views

How to reverse the direction of the y axes

I have a similar question to this one. Unfortunately, the answers there didn't help me. I would like to plot a simple function with the normal Plot function. ...
12
votes
1answer
790 views

Inheriting Options?

This question is an extension of Passing down arguments. To help clarify my question, I will be referring to another recent post of mine Making Quartile Plots from a Dataset, the code to which can be ...
10
votes
2answers
1k views

Solving/Reducing equations in $\mathbb{Z}/p\mathbb{Z}$

I was trying to find all the numbers $n$ for which $2^n=n\mod 10^k$ using Mathematica. My first try: Reduce[2^n == n, n, Modulus -> 100] However, I receive ...
13
votes
1answer
374 views

Is there a good reason for the removal of this FrameTicks syntax?

In past versions of Mathematica one could use a terse syntax for FrameTicks: {bottom, left, top, right} In 10.1 this syntax is no longer recognized requiring the ...
9
votes
1answer
240 views

When to use GenerateConditions -> True

Many functions, usuallly those involving integration, take a GenerateConditions option which often defaults to False, or at ...
20
votes
2answers
6k views

Arrows on axes in Plot3D

I use the following code to draw Arrows on Axes in 2D graphics: ...
13
votes
2answers
622 views

Create new notebook at fixed size

Using Ctrl+n we are effectively doing FrontEndTokenExecute["New"] and, at least on Windows, a new window has a WindowSize equal ...
13
votes
2answers
2k 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., ...
26
votes
4answers
906 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 ...
17
votes
1answer
3k 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 ...
14
votes
1answer
433 views

SyntaxInformation: take allowed options from multiple symbols – possible?

Suppose I have a function like Options[f] = {foo -> 1}; f[opt : OptionsPattern[{f,g}]] := h@g[Sequence @@ FilterRules[{opt}, Options[g]]] I purposefully do ...
13
votes
2answers
526 views

Front End options

Inspired by a recent question and others like it, and not finding an existing duplicate, I ask: What is the hierarchy of Front End options? How do they work? How can their values be set and recalled?
10
votes
1answer
2k views

Triangle that collapse cells

I'm not very good in English , so is hard to explain but how put the triangle in the left that deploy or collapse a group of cells ?
19
votes
4answers
5k 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: ...
16
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/...
14
votes
2answers
1k 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... <...
11
votes
1answer
1k views

How to tell mathematica not to resolve stiffness issues

Very often I solve partial differential equations that are nonlinear and could be up to 4th order. In these cases, it is usual for the solution determined by NDSolve...
7
votes
2answers
2k views

Methods for NSolve

I've been using NSolve a moderate (50-100 equations) size system of linear equations and it has been working splendidly (Solve ...
5
votes
0answers
326 views

AbsoluteOptions doesn't return correct option value of Ticks?

I just come across a function called AbsoluteOptions when trying to figure out the specific option value of Ticks -> Automatic...
20
votes
2answers
517 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 ...
16
votes
1answer
846 views

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

I'm aware of two ways to manage positioning of Axes for Graphics3D: AxesOrigin and ...
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 ...
12
votes
1answer
343 views

How can I make FilledCurve smoother?

In How can I generate and randomly assign color to annular sectors? J.M. showed an interesting way to create a sector graphic using FilledCurve. Unfortunately it ...
12
votes
4answers
363 views

Is it possible to separately call the default value of a variable which isn't at the end of the sequence?

After reading this post I recalled an old question I once met. We know that we can set default values for variables of a function: ...
19
votes
1answer
368 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" ...
15
votes
4answers
4k 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 ...
17
votes
1answer
267 views

Notebook's TaggingRules inherit too much

Bug introduced in V10.4 or earlier and persisting through V12.0 [CASE:3852725] was created [...] I have forwarded an incident report to our developers with the information you provided. [...] ...
13
votes
2answers
3k views

Labels and tickmarks inside Frame

Is there a way to force Plot and related functions to place the tick labels inside, rather than outside a frame? For example, consider, ...
6
votes
3answers
635 views

How to preserve clipping when exporting a framed histogram with font embedding?

I work with histograms and would like to export it to EPS format. I've noticed that my exported image loses the PlotRangeClipping option that I set up when I export the plot. This is true for at least ...
26
votes
3answers
871 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: ...
30
votes
2answers
629 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 ...