Questions tagged [options]

Questions dealing with optional named arguments of Mathematica functions.

Filter by
Sorted by
Tagged with
7
votes
3answers
473 views

Obtaining the number of iterations used in ReplaceRepeated

ReplaceRepeated has an option MaxIterations which indicates Mathematica is keeping track of the number of iterations. Is there ...
7
votes
2answers
313 views

How to specify and use nested options for a function?

I want to write a function that takes options that are nested. For example, suppose the function has one main option, "method" which can take two values, "a" and "b". Also, when method is "a", it can ...
7
votes
2answers
757 views

How to make a notebook that will be window maximized when open?

I use CreateDocument[cells, opts] to create a notebook. When the notebook is open, it has a small default windows size and I need to manually maximize it every ...
7
votes
3answers
343 views

Get unevaluated option value?

This is kind of a follow-up to this question. I want to be able to define a function that takes an option, and then, inside the function, retrieve and test the unevaluated value of the option. For ...
7
votes
2answers
992 views

How to show wireframes on imported Object / Mesh (.obj file)

I've managed to import a Wavefront (.obj) file and store it in a variable like so: ...
7
votes
2answers
406 views

Mesh at Ticks positions

In a ListPlot3D[ ] I want to have the Mesh at the same positions as the ticks. For some reason this isn't default if both are ...
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 ...
7
votes
1answer
169 views

FormatType with respect to Cell's content

Minimal example: Let's establish a notebook's stylesheet with additional TestStyle which has a FormatType->"CellExpression": ...
7
votes
1answer
162 views

Way to add a same option to multiple functions

Just wanna figure out if there is a decent way to add a same option to multiple functions simultaneously. For example I have a series of SoundNote: ...
7
votes
1answer
874 views

What does MaxStepFraction do?

I find that with NDSolve[...] while solving a partial differential equation, changing the MaxStepFraction from ...
7
votes
1answer
306 views

Setting up TextStyle with initialization cells in Mathematica 6+

It used to be quite straightforward to change the default settings of a notebook in terms of inputs, outputs, text styles and font sizes in previous versions of Mathematica using initialization cells ...
7
votes
1answer
459 views

How to find the options available for a function? [duplicate]

I was trying to create an animated .gif with Mathematica. I knew that the function to use was Export["animation.gif",tableplot] where ...
7
votes
1answer
323 views

How to apply compound styles to curves in e.g. Plot

Say, I have a colorlist listColor={Black,Brown,Red,Cyan} Now, I have some Plot function that I can use this list: ...
7
votes
1answer
234 views

How to inherit options by scoping?

Consider the following example: you have a function framed producing a cell with a button that, when pushed, calls framed again. ...
7
votes
2answers
78 views

How to know what GraphLayout was used when Method set to Automatic

I was expecting to get the answer to the above by doing either of the following: ...
7
votes
1answer
184 views

Difference between Initialization Cell and Group

Is there a difference between setting a Cell or a Group of cells to be an Initialization Cell...
7
votes
1answer
123 views

Change default color of selected items in ListPicker

This question was also asked on Wolfram Community. As the title already says, my question is Is there a way to change the highlighting color of the items that are marked/selected inside ...
7
votes
1answer
144 views

Make all new cells have a specific style as a function of the Mathematica installation

I would like all new Input and Output cells, in fact all new cells including section headers and such, to have a specific stylistic property (...
7
votes
1answer
591 views

Can Mathematica check spelling during typing?

I can't see a way to get Mathematica to check my spelling as I type. Is this feature not supported? I've done everything I can think of with my options: Is there a setting I'm missing?
7
votes
0answers
74 views

Option precedence for CellLabel

In Mathematica, when an option is specified multiple times with different values, the first one will take precedence. This works with Cell and ...
7
votes
0answers
59 views

Unwanted evaluation of RHS of association in FilterRules

FilterRules is a handy function that works on associations, however it does not respect delayed association-values. RuleDelayed ...
6
votes
3answers
783 views

How to return the value of Automatic when it is used in a Mathematica function?

If I have a function, for example: p1 = Plot[Evaluate[S[t]*10^-12 /. sol], {t, 20 10^-9, 49 10^-9}] and this function is setting options->Automatic so the ...
6
votes
2answers
800 views

Passing unquoted strings (poor man's enumeration)

I would like to be able to pass an unquoted string as a parameter to a Mathematica function [that I am writing] and have it show up without evaluation if the string happens to be defined. Thus I would ...
6
votes
2answers
201 views

Using a held option

Woud there be an elegant way to use a held option ? For example if I need to pass by reference several variables but I don't always need all of them, it can be useful. For example if I want to append ...
6
votes
3answers
172 views

Monitor the computation only if a certain Option is given to the function

Suppose I have the function heavyFunction[x_]:=Module[{n},Do[Pause[0.1],{n,100}]] representing some complicated and time-demanding computation. I want in some ...
6
votes
1answer
2k views

Make Plot look like Bloomberg terminal

I've always wanted to make my financial Plots look like a Bloomberg terminal. How would I go about making my chart look like one? I am talking specifically about ...
6
votes
3answers
627 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 ...
6
votes
3answers
622 views

How to disable differential styles/markers/etc. for multiple entities?

For functions that can produce multiple "style-able" entities, Mathematica by default will give each such entity a different style. Similar conventions apply to other features, either by default, or ...
6
votes
1answer
95 views

How to delete an option from a notebook

The Q&A How to unset an notebook option programmatically? nearly asks the same question, but the focus there is on how to unset an option that has been given a value. I just want to undo a ...
6
votes
2answers
205 views

Should I Protect function's options

I'm trying to figure out what is the best way to protect symbols within a package (a function's options in particular) so that no other value can be assigned to it. Consider a function ...
6
votes
2answers
274 views

What causes the error NotebookEvaluate::nbnfnd?

Help says: NotebookEvaluate can take either a NotebookObject or a filename referencing a notebook file. therefore, I wonder why ...
6
votes
1answer
800 views

Warnings shows up in message window

I have no idea why, but suddenly all my evaluation with warnings (like Sum::div:Sum does not converge) has begun to show up in a message box. Since always they ...
6
votes
2answers
133 views

How to prevent front end from suggesting Symbol option names (when actually String), and from adding them to Global` context

Help! I am writing a package with a function which takes lots and lots of different options which are Strings. When used, the front end autocompletion is ...
6
votes
2answers
492 views

How to make a customized plot function that can plot functions with optional parameter?

Suppose I make the following function to plot contour lines for a complex function: ...
6
votes
2answers
629 views

Labelling a subset of contours using ListContourPlot

I have a data set with entries of the form [nx,ny,E] and have made a contour plot of this data. I would like to add labels to only a subset of these contours, for instance every other contour. How ...
6
votes
2answers
258 views

How is OptionsPattern[] defined? Can I replicate this?

I am writing several functions which all take similar input parameters (a complicated nested list structure). Is there some way for me to define a pattern that can be used in multiple places and ...
6
votes
2answers
217 views

Fractions formatting in Column / Grid

Fractions are squished in GridBox: ...
6
votes
2answers
402 views

How to write complex function definitions at run time?

(Posting as a self-answered question to share a technique I discovered) In a certain project, I have many function definitions in which all parameters should be optional and come with default values. ...
6
votes
1answer
132 views

Passing options to GraphicsRow

I'm trying to pass the options to a simple function based on GraphicsRow as in the example below, but I get a long list of errors. ...
6
votes
1answer
473 views

Compiling a function that takes lots of optional arguments

I have a function that takes lots of optional arguments (basically some design parameters, about 10 of them) and performs some basic algebraic calculations involving complex numbers with the options. ...
6
votes
1answer
62 views

Option Inspector “Permanent” Change

Whenever the package LieART is loaded using << LieART`, ...
6
votes
1answer
128 views

Automatic shading of all InitializationCell->True cells in older versions

Mma Version 11 already has this feature: Initalization cells are automatically shaded light grey. This is a very useful feature and I would like to retrofit it to my older version 10.1. On a Mma-11 ...
6
votes
1answer
55 views

What is the difference between `OptionsPattern` and a sequence of `Rule` in a pattern?

I'm experimenting with options. In my first tests, I wrote something like that to capture the options given to a function: f[opts___Rule]:= {opts} I later ...
6
votes
1answer
88 views

Is Depth[x, Heads->True] historical?

I randomly found that Depth has a boolean option called Heads: ...
6
votes
1answer
175 views

Retrieving PlotRange from BarChart in Mathematica 11

Further to the accepted answer to this question: Retrieving PlotRange from BarChart, how can this be done in version 11? In version 7 it worked like this. In version 11 it doesn't work. Code for ...
6
votes
1answer
103 views

How to work with BoxOptions (ButtonBoxOptions, PanelBoxOptions, etc.)

The main question is in the title. Here are subtopics I'd like to focus on: Is there a tutorial related to them anywhere in documentation? How can I check what are current values of e.g. ...
6
votes
1answer
368 views

Simulated Annealing, SearchPoints and InitialPoints options set at the same time

I have a function that needs to be minimized. Since the function depends on real-time data (which is fetched every few hours, and the function is redefined according to the new data), I have to run ...
6
votes
2answers
806 views

How can I change printing margins by page?

I want to have different margins in my notebook for bookbinding. I could change header and footer, but I couldn't individually change page margins
6
votes
1answer
302 views

Set some Method options for NDSolve globally while allowing others to change

In a code base that is difficult to change for unrelated issues, I have many invocations of NDSolve that look like the following: ...
6
votes
1answer
97 views

How to specify Options for a custom Import converter?

Mathematica includes RegisterImport to setup custom functions which read and translate file data for Import, effectively ...

1 2 3
4
5
11