A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [options]

Questions dealing with optional named arguments of Mathematica functions.

Filter by
Sorted by
Tagged with
9
votes
2answers
1k views

How to “undo” SetOptions (restore defaults)?

Say I had some good reason to use, for example SetOptions[Plot,ImageSize->500, LabelStyle->OutrageousPink]; But now sometime has passed, life has changed, ...
8
votes
2answers
3k views

Mathematica 10, Show, and PlotRange

I have recently moved from Mathematica 8 to Mathematica 10, however I'm having a problem with PlotRange->All in combination with Show[]. For example, ...
7
votes
1answer
155 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
811 views

What does MaxStepFraction do?

I find that with NDSolve[...] while solving a partial differential equation, changing the MaxStepFraction from ...
6
votes
2answers
204 views

Fractions formatting in Column / Grid

Fractions are squished in GridBox: ...
4
votes
1answer
586 views

How to combine option settings in multiple plots such as Epilog/Prolog?

Suppose you have a program that produces plots. Later a user wishes to combine some of them with Show. The options in the first plot will override the options in ...
3
votes
2answers
81 views

PageBreakAbove -> True breaks CellMargins

Top CellMargin of the cell with PageBreakAbove is ignored in SlideShow environment (or for ...
8
votes
2answers
546 views

What are the Method options Solve command accepts?

What are the Method options Solve command accepts? Solve has the Method option, however documentation contains no methods that it accepts...
5
votes
1answer
463 views

How to check the option value?

Given that I have a function func as follow: To check the value of options, I using the step-by-step method If[] ...
4
votes
0answers
256 views

PlotRange->Automatic the exact function used to calculate outliers

I know that PlotRange->Automatic does the following: "the distribution of coordinate values is found, and any points sufficiently far out in the distribution ...
4
votes
2answers
113 views

Determine the PlotRange of a Graphics object programmatically

Given some graphics expression, I would like to be able to programmatically find its PlotRange in a form of a list containing figures. I just would like to stress ...
3
votes
1answer
393 views

How do I color Riemann integral rectangles using conditionals?

I'm building a function to visualize the Riemann integration process for any function using rectangles. Everything is fine, except that I need the color of the rectangles to change if they're under ...
17
votes
3answers
618 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 "...
19
votes
2answers
592 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 - ...
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).
14
votes
1answer
434 views

“ParametricSensitivity” in ParametricNDSolve

"ParametricSensitivity" is listed as a Method in the documentation for ParametricNDSolve, ...
20
votes
3answers
423 views

Options which require RuleDelayed

For some functions in Mathematica it is important to use RuleDelayed. One prominent example is the EvaluationMonitor for ...
4
votes
2answers
2k views

How to Set the Ratio of Units of the Axes in a 2D Plot?

Consider the following plot Plot[{Sin[x]}, {x, 0, 2*Pi}, PlotRange -> {{0, 2*Pi}, {-1.05, 1.05}}, AxesLabel -> {x, y}, AxesOrigin -> {0, 0}] It is ...
17
votes
1answer
479 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 ...
9
votes
2answers
278 views

Options for ValidationSet accuracy from NetTrain?

With NetTrain[] if you use the option ValidationSet->Scale[.1] it will run a validation test on 10% of the training data ...
10
votes
1answer
138 views

How to put Magnification control in docked cell

I have made a handy toolbar that provides access to menu items that are not visible when I F12 a workbook. I would like to add the following function to a button in the toolbar: ...
6
votes
2answers
198 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 ...
4
votes
1answer
62 views

What are the automatic settings of a BSplineCurve object?

Consider the following object: spline = BSplineCurve[{{0,1}, {1,1}, {0,1}, {-1,1}, {-1,0}}, SplineClosed->True]; Graphics[spline] What would be an equivalent <...
11
votes
1answer
187 views

Option Lighting in the Show function does not work

Bug introduced in 11.2 or earlier and persisting through 12.0 There are something wrong when I try to evaluate the example from Lighting Docs, here is the code: <...
8
votes
2answers
2k views

How to set the NDSolve method to LSODA

I notice that off all the Method options available for NDSolve[...], LSODA is invoked quite ...
7
votes
1answer
221 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. ...
6
votes
1answer
114 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
3answers
164 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
3answers
616 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
2answers
400 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. ...
5
votes
3answers
700 views

Switching among view points in a Manipulate expression

Edit: Some additional viewpoints were included to make it easier to test. Here's code for an alternative function, the graph of which is a bit less symmetric. Feel free to use either code set: ...
5
votes
2answers
127 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 ...
4
votes
3answers
152 views

How to center a dialog with respect to a parent notebook

If you have a mess on e.g. three screens, you work on the very left one and get a MessageDialog centered with respect to the main screen, it can get unnoticed. ...
4
votes
2answers
236 views

Extracting Color Options from BarChart

I would like to extract the colors (i.e., obtain RGBColor[] or other full specification) of the different colors used in a bar chart such as this ...
4
votes
1answer
172 views

How to set options in Option Inspector in notebooks by running commands?

It involves an order of magnitude more mouse clicks and visually searching text to set some option in the Option Inspector (which is a UX nightmare) than doing that in a notebook by running some ...
1
vote
1answer
186 views

Bound on number of function evalulations in FindMinimum

I am minimizing a nonlinear constrained problem using FindMinimum. The problem involves about 200 variables and the function is a black-box which cannot be compiled/...
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): ...
10
votes
0answers
120 views

Is “MaxMessageCount” broken or is its function counter-intuitive?

Behavior remains unchanged through Mathematica version 11.1 As noted by kguler the Front End option: MessageOptions -> "MaxMessageCount" does not appear to have ...
9
votes
1answer
979 views

Creating self destructing notebook

Inspired by this post I've been trying to implement the idea in Wolfram with no success yet. I've come pretty close though and need some help. So I've managed to do this: ...
8
votes
1answer
161 views

Inconsistent Authorization Dialog (401) handling

Bug introduced in V11 and fixed in 11.3 [CASE:3855554] was created [...] It does appear that the URLRead is not behaving correctly. I have forwarded an incident report to our developers with ...
8
votes
2answers
260 views

Option inheritance: setting new defaults and private context

I'm having issues with inherited options for functions I defined in a package file. Setting new default options doesn't quite work as I expect. Also, a function which I'd like to stay private to the ...
7
votes
1answer
318 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: ...
6
votes
1answer
97 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
2answers
790 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
601 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
1answer
194 views

Graphs' options vs JournalArticle stylesheet

Bug introduced in 10.4 and fixed in 11.01 As noticed by Alexei Boulbitch, below one of my answers, there appears to be an unexpected issue with VertexLabels in <...
5
votes
1answer
96 views

String option names for Cells

They seem to be correctly interpreted. I'm asking because of some minor reasons and a major one: NotebookWrite a Cell with WholeCellGroupOpener option I don't know any official confirmation so let ...
5
votes
3answers
323 views

difficulty abstracting the OptionValue pattern

I am building lots of functions that use Options and OptionValue and wanted to reduce the redundancy in the expressions that ...
5
votes
1answer
62 views

CreateNotebook[“Testing”] writes all TaggingRules to the notebook

Bug introduced in V11.2 or earlier and persisting through V11.3 CASE:4072649 Some of notebook types generate notebooks with TaggingRules for their purposes: <...
4
votes
1answer
76 views

Correct arithmetics for CellMargins, CellFrame and CellFrameMargins

When writing this answer I came into trouble trying to calculate total horizontal margins for contents of a cell in the right way. The first part of the problem is that both ...