0
$\begingroup$

Obviously there are many ways to change the global settings, such as $PlotTheme or SetOptions[], but what I'm looking for is a way to streamline the process of setting the right options for all the plots in my notebook - especially referring to things like font size, tick size, etc.

Is there a way for me to set these options for every plot in the notebook? Maybe even a way to change the default settings for plots? I have to create a lot of plots with Mathematica, and I would love there to be a quick way to have them all abide by the same standards.

$\endgroup$
2
  • 1
    $\begingroup$ If you put a SetOptions statement in your Init file it should have the same effect as changing some of the default options in your plots. $\endgroup$
    – Bill Watts
    Jan 16 at 21:49
  • 5
    $\begingroup$ I think you might also find this interesting: Is it possible to define a new PlotTheme? $\endgroup$
    – MarcoB
    Jan 16 at 23:27
2
$\begingroup$

Here is an example of a group of custom plot settings that you can define once at the top of a notebook, and can use repeatedly after that:

myPlotSettings1 = { 
   PlotStyle -> {{Red, Thickness[0.01]}, {Blue, Thickness[0.01], 
      Dashing[0.02]}, {Black, Thickness[0.01], Dashing[0.01]}, {Green,
       Thickness[0.01]}},
   PlotTheme -> "Scientific",
   Axes -> True,
   Ticks -> Automatic,
   GridLines -> Full,
   BaseStyle -> {FontFamily -> "Times", FontSize -> 14},
   LabelStyle -> Directive[Black],
   ImageSize -> 500};

Here is how you use your custom plot settings inside a Plot command:

Plot[{Sin[x], Cos[x], None, Sin[x]/x}, {x, -2 Pi, 2 Pi},
Evaluate[myPlotSettings1],
PlotLabel -> "Plot Title",
FrameLabel -> {"X Axis Label", "Y Axis Label"}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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