Questions tagged [options]

Questions dealing with optional named arguments of Mathematica functions.

Filter by
Sorted by
Tagged with
14
votes
3answers
642 views

Dealing with nested options

OptionValue allows for recent versions of Mathematica (I think as from 7) to easily access optional parameters if they are explicitely given to a function or their default values otherwise. For big ...
14
votes
2answers
977 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... <...
14
votes
4answers
3k 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 ...
14
votes
1answer
2k views

PlotRange -> All vs Full?

What is the difference between PlotRange -> Full and PlotRange -> All in a Plot, ...
14
votes
1answer
347 views

Problem using OptionValue with functions defined by SubValues, and the use of Options for function dispatch

I have a function that looks like: ...
14
votes
3answers
1k views

Opening new notebooks with a non-default window size

I'd like to set Mathematica (8.0.4.0) up so it opens new notebooks with the "NaturalColor" stylesheet and with a WindowSize like ...
14
votes
1answer
1k views

Can Manipulate controls have the option Appearance -> “Labeled” by default?

I was wondering if there's a way to tell Mathematica to use the option Appearance -> "Labeled" for all Manipulate commands by ...
14
votes
3answers
905 views

Pass by reference for an option argument

Pass by reference can be faked by using HoldAll or something similar in the definition of a "Function". But can pass by reference be faked for symbols passed as ...
14
votes
0answers
664 views

PenaltyFunction Option in NMinimize

I am curious if anybody has some experience in using the built-in Option "PenaltyFunction" in any of the numerical optimization functions like NMinimize. According to the documentation the user ...
14
votes
0answers
324 views

Unexpected design of protection against dynamic content

Introduction/summary I was surprised by the (from my point of view limited) extent to which the user is defended against "potentially unsafe dynamic content" by default. Two things were unexpected ...
13
votes
2answers
1k views

How to change NeuralNetwork options?

How can I manipulate the architecture and problems of a NeuralNetwork in Predict or Classify? For example, running the following ...
13
votes
4answers
432 views

Renaming options of custom functions while preserving backwards compatibility

I have a package with many functions. There is an option name that several functions share. I feel that the current name of this option was not the best choice. I would like to rename it, but at the ...
13
votes
3answers
962 views

What does the AspectRatio option actually do?

The Documentation for AspectRatio on its first line under the "Details" section states: "AspectRatio determines the scaling for ...
13
votes
2answers
568 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
3answers
2k views

How do I remove the top bar and bottom bar from the Students Mathematica window?

Any idea how to remove the top bar saying "Wolfram Mathematica .... Demonstrations MathWorld Studenforum Help" from the Mathematica main window (see screenshot). It has no use to me and it steals ...
13
votes
2answers
1k views

What is the precedence of FrameStyle, FrameTicksStyle, and LabelStyle? How to have a LabelStyle different from FrameStyle

From the documentation: Plot[2 Sin[x], {x, 0, 10}, Frame -> True, FrameLabel -> {x, y}, PlotLabel -> 2 Sin[x], LabelStyle -> Orange] But then add a ...
13
votes
2answers
8k 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. ...
13
votes
2answers
449 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?
13
votes
1answer
554 views

Pass Options to Export[]

I'm working with Options to change the look and feel of some generated Graphics by passing Options to several functions, one of them being Export[]. For example: <...
13
votes
1answer
358 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 ...
13
votes
2answers
2k 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, ...
13
votes
1answer
395 views

“ParametricSensitivity” in ParametricNDSolve

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

TimeSeries interpolation with time gap awareness

Is there an option for ResamplingMethod (or any other practical way) for specifying different behaviours of the interpolation, depending on, for instance, closest dates (on the ...
12
votes
2answers
440 views

Manipulating OptionsPatterns[]

How do you combine OptionsPatterns? For example, I would like to have a function that can take both options that I specify, and options for all graphs: ...
12
votes
2answers
694 views

Is there a way to programmatically set global preferences?

Can I set global preferences that are accessible via "Edit"->"Preferences" programmatically from within a notebook? As learned from this question, turning off anti-aliasing can make a huge difference ...
12
votes
4answers
300 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: ...
12
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., ...
12
votes
3answers
687 views

How to check the validity of an option value

I have a user-defined function, func, which takes the following form: func[arg1, arg2, options] Here is the actual code ...
12
votes
1answer
464 views

Function as an option to a function

I am new to mathematica ,so this question may seem a little naive. I know how to use the option as an argument to a function, we can define an option by using ...
12
votes
1answer
321 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
1answer
488 views

What's a good style for inheriting Options[] of built-in function?

Options[myPlot] = Options[Plot]; myPlot[args___] := ... When defining a "wrapper" function like the above, I'd like it to inherit the ...
12
votes
1answer
373 views

What is Hessian?

I was working today and had to calculate the Hessian of a matrix, then I wondered a Hessian function might already exist. I typed Hessian and it does exist, but ...
12
votes
1answer
198 views

Creating Saveable->False notebooks

Bug introduced in 10.3 or earlier and fixed in 11.1 Reproduced on Windows 7, 10 Bug confirmed by WRI: [...] It does appear that the Saveable Notebook Option on Windows is not behaving properly, ...
12
votes
1answer
370 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 ...
12
votes
1answer
872 views

Possible Method for MatrixExp

Well, probably a hard question, but I think it's better to cry out loud :). I noticed that MatrixExp has a Method option when ...
12
votes
1answer
354 views

AbsoluteOptions prints error messages in V10

Bug introduced in 10.0.0 and fixed in 10.0.2 I am trying to use AbsoluteOptions in V10 but I am getting the Out with some errors as see in this picture: does anyone have same issue?
12
votes
1answer
137 views

Toggling DynamicUpdating aborts dynamics with UpdateInterval

Bug introduced in V10.4 or earlier, fixed in 11.1.0 A support case with the identification [CASE:3710168] was created. [...] I was able to reproduce the issue [...] I am checking with the ...
11
votes
1answer
3k views

Which methods are available for NMinimize?

I can't find in the documentation the list of methods available to NMinimize[]. Is there a way to get this? The NMinimize page in Documentation Center mentions only ...
11
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
1answer
548 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 ...
11
votes
2answers
346 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 ...
11
votes
1answer
297 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 ...
11
votes
1answer
272 views

DifferentialEvolution scaling factor randomization

Using NMinimize for finding global minima, one can choose the DifferentialEvolution method. You can find a (not so) detailed ...
11
votes
4answers
456 views

How do I place vertical GridLines in front of horizontal ones?

By default horizontal GridLines are placed in front of vertical GridLines: ...
11
votes
1answer
182 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: <...
11
votes
4answers
185 views

Generic way for Dynamic style Directives in Histogram or DateHistogram

Let's say I have two samples: ...
11
votes
1answer
220 views

Figuring out how AbsoluteOptions works with Graphs

I am puzzled by how AbsoluteOptions works with Graph objects. I would have expected that one could use it to obtain all the ...
11
votes
1answer
126 views

Creating notebooks with specific options being editable but not saveable

The goal To create a notebook whose options, when the notebook is opened, are fixed regardless of edits done to the notebook. E.g. WindowSize -> Automatic and <...
11
votes
0answers
339 views

Setting non-standard ImageResolution for EMF export as default

Mathematica has a bug in that BarCharts and ListPlots with Filling will export as a ...
11
votes
0answers
538 views

How to style and position VerticalCallouts and RadialCallouts

Here is a pie chart with a labels placed with a "VerticalCallout" ...