Questions tagged [options]

Questions dealing with optional named arguments of Mathematica functions.

Filter by
Sorted by
Tagged with
1 vote
1 answer
67 views

Ensure that Options for built-in symbols are the original defaults

I often create symbols (no args) or functions (with args) in which common options (and styles) are set in body and unique opts within args for managing multiple calls to built-in functions. these spit ...
user avatar
  • 1,829
10 votes
1 answer
98 views

How to list all possible string arguments of a specific function?

For example, to learn the function Alphabet, we can read its document. But it's rather ambiguous, like "Some languages have extra properties". How to find ...
user avatar
1 vote
0 answers
77 views

How to DeleteDuplicates from a list of Rules having set to different values whereby we wish to drop the last occurrence?

About This Function This will eventually set default values for Options based on the end users preferences so that no OptionsPattern need ever be set. The symbol<...
user avatar
  • 1,829
2 votes
1 answer
140 views

A question related to the usage of LegendLayout -> {"Row", 1}

I saw this piece of code from an answer by @Syed here. ...
user avatar
  • 2,207
6 votes
2 answers
215 views

RegionPlot is slow to plot a simple region

I start out with 5x5 matrix gCorrMatrix[g] depending on a parameter $g$ and an unknown $W_2$ ...
user avatar
0 votes
0 answers
29 views

Having Difficulty getting heading and data alignments to behave in a custom themed DataSet?

I'm actually quite competent when applying Option Style-s to almost any output so it puzzles me that everything I tried only ...
user avatar
  • 1,829
2 votes
2 answers
192 views

Why does this PhaseRange not work?

Any idea why this PhaseRange does not work? BodePlot[-(1/(s + 1000)), PlotLayout -> "Phase", PhaseRange -> {0, 2 \[Pi]}]
user avatar
  • 1,862
4 votes
1 answer
85 views

How to use the option ExternalForce in NBodySimulation

I want to simulate the movement of a small ball on a curved track like the following: This is my current code: ...
user avatar
  • 23.7k
3 votes
1 answer
90 views

Determining the Method Chosen When an Option is Set to Automatic

Many Mathematica functions with multiple methods have an option where the method is set to Automatic. Is it possible to have these functions output what method they choose. For example, if I'm using ...
user avatar
  • 613
1 vote
1 answer
102 views

Different behaviour of margins from version 11 to 13

Testing some "11" code on version "13" I noticed an unpleasant difference: the borders of a graph are handled differently. A simple piece of code that reproduces the problem is <...
user avatar
3 votes
1 answer
66 views

How to simplify list of Graphics options?

When looking at the internals of graphics expressions we often see that some options like PlotRange, Frame, ...
user avatar
1 vote
1 answer
63 views

Propper way of getting rid of FilterRules statements when passing options?

When passing options from a function f to a function g in the body of f one can use the <...
user avatar
  • 928
0 votes
0 answers
62 views

How can I change the derivative symbol ' in output

The derivative symbol in "output" is always like this f'(x) but I want something like D[f[x],x] or ...
user avatar
  • 1
5 votes
1 answer
101 views

Adding logging functionallity in package

I build a package with code to solve specific equations. The code has become quite complex and so to convince myself (and others) that it works correctly I would like to add some code to write ...
user avatar
  • 928
1 vote
1 answer
51 views

Labels in DateListPlot not visible

The problem: I combine two lists in one DateListPlot. The first list has labels. When I combine both in one DateListPlot, some ...
user avatar
0 votes
0 answers
32 views

how to record the viewpoint and viewvertical when using Manipulate Bookmarks?

I learnt from a relevant question that we can click on the plus sign of the Manipulate output, and choose "Add to Bookmarks" to store different set of values of controls, so that one can ...
user avatar
  • 675
1 vote
1 answer
118 views

Condition (/;) not working correctly on a function with optional arguments and options

I have read this post: How to avoid collision between optional arguments and options, and use Mr.Wizard's method to solve this problem. But when I add conditions to optional arguments, it seems that ...
user avatar
  • 306
0 votes
0 answers
26 views

Overriding default value of inheritied option as per passed options

Consider the following example that shows the spirit of my problem: ...
user avatar
  • 902
5 votes
1 answer
84 views

SetOptions not persistent between sessions

Let's say I decide I want all my axes to be colored red, so I do SetOptions[Plot,AxesStyle->Red] For the remainder of my session, I correctly get ...
user avatar
  • 199
1 vote
1 answer
62 views

Supplying options with an association [closed]

Let's say I have an association, like {"PlotStyle" -> Red}, and I want to use it to supply options to a function, such as ...
user avatar
  • 113
1 vote
1 answer
66 views

Globally set a time constraint for simplifications

I am using a differential geometry package (the now discontinued Atlas) which repeatedly calls the Simplify functions in its computations, which in some cases leads to extremely long (days? In the end ...
user avatar
  • 113
1 vote
0 answers
15 views

How to Dynamically update CellFrame around 1, 2 or more cells of the same style (Looking for a Stylesheet Solution)

The following "Theorem" cellstyle in defined in my private stylesheet ...
user avatar
  • 4,559
1 vote
0 answers
104 views

How to make a function ignore an argument [closed]

Motivation I am trying to call a function f, that has either 1 or 2 (or multiple) parameters, from a function g that uses ...
user avatar
0 votes
0 answers
45 views

Graphics3D default properties? [duplicate]

I realized that it is impossible to reproduce default sphere only by declaring its color. ...
user avatar
  • 2,825
3 votes
1 answer
130 views

Extracting Lighting specs used in a Graphics3D object

I'm getting a plot which is mostly fine with Lighting->Automatic, but a bit too dark. How do I go about getting the Lighting specification used in the plot so I ...
user avatar
1 vote
0 answers
56 views

Rule Precedence

Do I understand the following correct ($R$ on-the-fly executable rules, $E$ expressions)? I assume MATHEMATICA uses an unification algorithm like I learnt it for e.g. PROLOG. If $R_1$ was defined ...
user avatar
0 votes
0 answers
44 views

How to have Mathematica showing a dropdown list after entering an option and the -> in a function argument [duplicate]

When I enter Plot[Sin[x], {x, 0, 2 Pi}] Mathematica returns, as expected, the expected Sinus wave of one period. Plot has many, many options, when I enter: ...
user avatar
7 votes
0 answers
69 views

Why does Longest not work on OptionsPattern?

When having a function with optional arguments and options, I frequently find myself writing something like this: ...
user avatar
  • 23.8k
4 votes
0 answers
49 views

What are the valid options for the "ParametricCaching" option in ParametricNDSolve?

I am using ParametricNDSolve as part of the calculation of an objective function for an optimization, so I am trying to strike a balance between memory usage and ...
user avatar
0 votes
0 answers
52 views

How to make a better self-closing toolbar button that always works?

My DockedCellstoolbar has a self-closing button that sometimes decides to permanently stop working on that particular notebook. closing and reopening file always ...
user avatar
  • 1,829
1 vote
1 answer
30 views

Saving function evaluations to DownValues for function with options

I have a time-intensive function with options that I would like to not evaluate more than necessary. ...
user avatar
  • 1,055
8 votes
1 answer
144 views

OptionValue doesn't work if a local variable has the same name as the function itself

The following innocent-looking code results in error. ...
user avatar
  • 489
4 votes
1 answer
74 views

Refer to OptionValue externally without a specific function name

I want to refer to the actual option values of a function f outside of f, using OptionValue. ...
user avatar
0 votes
0 answers
112 views

Short forms for function-parameter combinations?

I find these to be very convenient, particularly since I use the base-10 log fairly frequently: Log[2, n]=> Log2@n ...
user avatar
  • 3,456
0 votes
1 answer
86 views

Why does ButtonBar ignore Background option and is it possible to color the actual face of the buttons in a ButtonBar?

Notice how I have Background->color set in each BUttonBarbut it is completely ignored. How do I fix this? Edit: (1) Bob ...
user avatar
  • 1,829
1 vote
2 answers
108 views

How can I change the default color of the basic geometric regions in 2D?

I like to use the basic geometric regions in Mathematica, like Parallelogram[...], Rectangle[...], ...
user avatar
9 votes
0 answers
182 views

Default window size too small in version 12.3 (in Windows 10)

After starting Mathematica 12.3, the default window size is like this, it's too small for me, I don’t want to manually drag the window every time. I have tried this, ...
user avatar
  • 6,530
2 votes
0 answers
43 views

Global LabelStyle option does not work with SetOptions

I want to set global options for a plot, so I used the SetOptions command. However, some of the options don't seem to be applied. More specifically, this is the ...
user avatar
  • 21
0 votes
2 answers
126 views

Add options to a graph after construction

Given a graph which has already been constructed, how can I add, e.g., the option VertexSize -> 3 to that graph without having to deconstruct the graph?
user avatar
  • 928
0 votes
1 answer
52 views

Restore messages function to the default ones

Times ago I used the command Off[NDSolve::tag]. Now I've been forgetting which message I removed and I would like to restore it. Someone knows if is there a way to reset all the default messages ?
user avatar
3 votes
1 answer
68 views

Adding spelling dictionary to Mathematica

I was hoping this could be easy, but it's not. I need to add the Czech spelling dictionary to Mathematica. I copied the two files: cs_CZ.aff and cs_CZ.dic in to the /Applications/Mathematica.app/...
user avatar
  • 215
2 votes
1 answer
138 views

Subscript keyboard shortcut not working on Mac OSX

The keyboard shortcut ctrl+_ for subscript does not work on Mac OSX (Swiss keyboard layout). If I use German layout, I can make subscript but no fraction. I've ...
user avatar
  • 181
0 votes
1 answer
77 views

Why won't Sequence work when wrapping a list of arguments for deletion with Remove?

I wrote a quick and dirty little function freshStart which does a variety of things meant to give me a nearly fresh Kernel without having to ...
user avatar
  • 1,829
0 votes
1 answer
47 views

Is there a way to change the behavior of matrices globally?

For instance, I want that Dot would be used as default multiplication of matrices instead of element-by-element multiplication. Similarly, I want any function (such ...
user avatar
  • 2,751
2 votes
1 answer
80 views

How to set MaxStepSize for the case of two variables

The option MaxStepSize permits to manually set the step size of the integration in NDSolve and similar functions. How do I set ...
user avatar
  • 6,124
6 votes
1 answer
139 views

Using a pure function as an option of a function

Here's my code: Options[f] = {"Func" -> Exp}; f[x_, OptionsPattern[]] := OptionValue["Func"][x] f[2, "Func" -> (# + 2) &] ...
user avatar
5 votes
2 answers
144 views

OptionsPattern does not match rule with compound left hand side

OptionsPattern was introduced in Mathematica v6 so I have finally decided to give a try. Look at this program: ...
user avatar
0 votes
0 answers
49 views

How to change Point options when using Map?

I want to change the point size of the points I am plotting in the code below, but wherever I place the PointSize[] option it doesn't like it. The code is part of a larger program, which generates a ...
user avatar
3 votes
2 answers
72 views

Tightly crop styled Text in a Graphics box

I am running Mathematica 9, which I realize is quite old. I wrote the following code to output a Graphics environment containing some styled text. But, as you can ...
user avatar
  • 9,425
2 votes
3 answers
170 views

How to make the Ticks larger? [closed]

I can´t find the option for larger ticks ...
user avatar
  • 3,071

1
2 3 4 5
12