Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [options]

Questions dealing with optional named arguments of Mathematica functions.

Filter by
Sorted by
Tagged with
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
2answers
195 views

Why does SetOptions not know about ImageSize for Show?

ImageSize works fine as an option for Show when used in a call. Show[image,ImageSize->100] But SetOptions does not know about that: ...
5
votes
1answer
479 views

Manipulations with options

I have two functions with options, for example f and g ...
5
votes
2answers
126 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 ...
5
votes
2answers
83 views

Giving Plot options defined outside of the Plot expression

How can I give Plot formating expressions on a separate line just like ListPlot? When I use the following code with ...
5
votes
2answers
94 views

How to specify both Center and Graphics directives for Dividers option in Grid?

The docs for Dividers give an example featuring Center as the setting for the the Dividers ...
5
votes
3answers
236 views

FillingStyle->{None,Automatic} gives unexpected results?

Plot[1 - x^2, {x, -1.5, 1.5}, Filling -> Axis, FillingStyle -> {None, Automatic}] produces an outcomes I find unexpected: In contrast, ...
5
votes
1answer
773 views

How to make a filled Ellipsoid?

I want to make a filled Ellipsoid, but it seems Filling options doesn't work in Graphics ...
5
votes
1answer
1k views

Evaluating function only when its optional argument is numeric

I want to have the argument 'a' for myf2 in form of optional argument, but at the same time I need to evaluate the function only if 'a' is Numeric, see also my previous question. ...
5
votes
3answers
692 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
1answer
158 views

Remove CellMargins option from many cells

I have a very old notebook in which many cells had the CellMargins option set manually. What's the easiest way to remove all those manual option settings?
5
votes
1answer
826 views

Can BoxWhiskerChart show both the median and outliers at the same time?

Is there an easy way to make BoxWhiskerChart show both the outliers and the median line? g1 below shows outliers but not the ...
5
votes
1answer
757 views

Is there a way to globally set when to treat a very small number as zero?

I understand that I can use Chop to force a very small number to be treated as 0 and can use ...
5
votes
2answers
238 views

Input alias having a place holder which gets selected when the alias is used

If one executes the following code ...
5
votes
1answer
540 views

Default FontFamily for PlotLabel

This is probably a rather basic question and I presume I am simply unable to make proper use of the Options[] function: I am trying to figure out what the default ...
5
votes
1answer
65 views

Is there a (simple!) way to convert all initialization cells of a document to normal cells?

I like to work with initialization cells. During the different stages of development of my notebooks, I however often need to change those. If they are scattered throughout the notebook, it is ...
5
votes
1answer
82 views

Why is { } interpreted as an option in my function? [closed]

I don't understand the output from: ...
5
votes
1answer
146 views

What is the difference between the second argument of ToString and its option FormatType?

Is there any real difference between ToString[expr, form] and ToString[expr, FormatType→form]? In all my examples, they seem to ...
5
votes
1answer
450 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[] ...
5
votes
1answer
89 views

Why are the edge items in Grid truncated?

The first and last rows and columns of my Grids always seem to be smaller than all the other rows in my Grid, as of they had ...
5
votes
1answer
124 views

How to safely forward/manage options between functions?

Algorithms can often be splitted into smaller and reusable functions (that's a good thing). However with this scheme it is not clear to me how to ensure the consistency of the option values and ...
5
votes
1answer
59 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: <...
5
votes
1answer
200 views

Is it possible to prevent LUDecomposition from pivoting?

By construction, LUDecomposition performs LU-decomposition with pivoting; i.e., with row permutations (otherwise, the decomposition may not exist). Is it possible ...
5
votes
1answer
89 views

Why is “Evaluatable” unchecked by default in cell option but cell still execute?

In my Mathematica, all my cells have the option "Evaluatable" unchecked by default Thus, if I want to prevent some cells to be executed, it is not possible because Evaluatable is already unchecked (...
5
votes
2answers
75 views

Is there a way to clear all the CellChangeTimes lists in a notebook?

I have a very large notebook that has evolved over years. It is the result of countless copy and paste, edit, divide, merge, etc., operations. Some of the cells have hundreds (thousands?) of ...
5
votes
2answers
166 views

CDF format - disable cell selection?

Is there any way/option in order to make Cells not selectable in exported CDF files? I know how to hide the cells until you go with the mouse over them on the ...
5
votes
1answer
94 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
0answers
76 views

OptionsPattern[] Vs. opt___ [closed]

Since version 6 I've been dutifully using OptionsPattern[] instead of the original opts___ for passing options to functions. I ...
5
votes
0answers
169 views

About the OptionsPattern[] approach of inheriting Options

Szabolcs showed in this post, that there are possibly two approaches to inherit function options. He recommended the Join approach. At first, I agreed. But today I ...
5
votes
0answers
77 views

Bug for Cubics -> True in Eigenvalues?

Let's consider the simple code ...
5
votes
0answers
92 views

What objects other than Button can take rules for their Appearance options?

So I was messing with the ServiceConnect dialog and I stumbled upon this hidden in a ButtonBox in its code: ...
5
votes
0answers
72 views

Controllers going out of sync after re-enabling dynamic updating (if external changes were made)

Bug reproduced in V10.4.1 and persisting through V11.0.1 A support case with the identification [CASE:3713364] was created [...] I was able to reproduce the issue, and consequently, I filed a ...
5
votes
0answers
75 views

How to know the string data/settings, of some options/functions

It is known that several functions and options take some sort of input in this form: option->"something" function["something"] The simple example for this is ...
5
votes
0answers
203 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...
4
votes
3answers
499 views

How to programmatically enable/disable a slider in Manipulate?

in my code below, I have 2 variables a and b, and a option whether it is on or off state. I would like to disable slider for variable b (and therefore it would take default value = 0 in that case) ...
4
votes
1answer
203 views

OptionsPattern[] taken as a Replacement Rule

I was trying to write my own plot function taking as unit size cm instead of points. I've tried ...
4
votes
1answer
698 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 ...
4
votes
2answers
438 views

Background coloring

I find the syntax of Background not clear. For instance in an example found in an old question ...
4
votes
2answers
196 views

Clearing all CellTags in a notebook

Below is some code that will delete all CellTags in a notebook where the CellTag is given by the string ...
4
votes
2answers
155 views

Setting WholeCellGroupOpener [duplicate]

When I write WholeCellGroupOpener, Mathematica autocompletes it, but it doesn't recognize it (it stays blue instead of turning black). Example: ...
4
votes
4answers
428 views

Change all Options of Plot Dynamically

I am trying to make a series of changes in the appearance of the Plot of some function. I am trying to use Manipulate for my experiments. I tried to change the following code ...
4
votes
3answers
348 views

Extracting unknown ColorFunction from Plot, Plot3D etc

I wonder if there is a way to extract existing ColorFunction and "override" it with a new function that will depend on original one. This question discusses ...
4
votes
2answers
1k 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 ...
4
votes
1answer
928 views

What is the fundamental difference between “PlotPoints” and “MaxRecursion”?

When making a plot, PlotPoints or MaxRecursion options are used to specify the accuracy or the extent of how detailed the result will be. Ff either of them do the similar job, I think only ...
4
votes
2answers
234 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
2answers
87 views

How to prevent an Optional parameter from taking an OptionsPattern parameter without multiple function definitions? [duplicate]

I have function the needs to enable some Optional parameters and an OptionsPattern. The issue I am facing is that the options ...
4
votes
1answer
84 views

Apply options only to one graph in a plot [closed]

Let's say I have this plot. It was produced using two different Plot3D commands combined via Show in order to reduce the ...
4
votes
2answers
2k views

Histogram with variable bin size [closed]

Suppose I have some dataset,e.g., Histogram[RandomVariate[PoissonDistribution[2], 10000], 10] which gives, $\hspace{2cm}$ How can I change the histogram such ...
4
votes
3answers
363 views

Variable widths on BoxWhiskerChart

BoxWhiskerChart automatically uses the same width for each of the boxes in a plot. I would like to force it to use a list of widths (with each width corresponding ...
4
votes
2answers
68 views

Pure Function passed as an option to a function, which uses other options of the same function as arguments

I am editing my original question, as I have figured out a method of doing what I want. Now my question is if there is a more elegant, efficient way to do the following: ...