Is it possible to assign a couple of Plot options like e.g.

Frame -> True, PlotRange -> All, ImageSize -> 500

to a variable so that I can use it instead of repeating all options in my next plot?

  • 4
    $\begingroup$ try SetOptions[{Plot}, Frame -> True, PlotRange -> All, ImageSize -> 500] see SetOptions $\endgroup$
    – Nasser
    Commented Apr 4, 2018 at 20:19
  • 6
    $\begingroup$ Also opts = Sequence[Frame->True,PlotRange->All,ImageSize->500 ] should be possible. $\endgroup$ Commented Apr 4, 2018 at 20:31

1 Answer 1


First of all, one should mention that it is possible to define a custom PlotTheme:

Is it possible to define a new PlotTheme?

Second, something like @Henrik Schumacher's suggestion is possible, but (1) you need to use Evaluate and (2) one can use a simple List instead of Sequence, which makes combining and adding options somewhat easier.

A couple of examples:

myPlotOpts = {Frame -> True, PlotRange -> All, ImageSize -> 500};

Plot[Sin[x], {x, -6, 6}, Evaluate@myPlotOpts]

Mathematica graphics

It combines with other options without having to worry about the list structure:

Plot[Sin[x], {x, -6, 6}, PlotStyle -> Red, Evaluate@myPlotOpts]

Mathematica graphics


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.