Currently, to have default font size values for my graphs I do the following:

SetOptions[{Plot},TicksStyle->Directive[50],AxesStyle-> Directive[50]];

However it will only do the job for Plot function. There are many others (like ListPlot, LogPlot, etc). Of course I could manually add them in the list given as first parameter here.

But I would like to know if there is a way to say something like "for all functions that uses the option "TicksStyle" put TicksStyle->Directive[50] so that it will be done once for all for all the possible function using it ?

  • $\begingroup$ Perhaps SetOptions[#, TicksStyle -> Directive[50], AxesStyle -> Directive[50]] & /@ Names["System`Plot*"]; or similar. $\endgroup$ – Natas Oct 1 '20 at 12:40
  • $\begingroup$ Unfortunately there doesn't seem to be an inheritance model for SetOptions. I was thinking that SetOptions for Graphics should work, since all plots are Graphics, but that doesn't work. $\endgroup$ – Natas Oct 1 '20 at 12:41
  GraphicsBoxOptions -> Join[{ImageSize -> Medium, 
     DefaultTicksStyle -> Directive[FontSize -> 20, FontColor -> Red,
        LineColor -> Green, Thickness -> Large], 
     DefaultAxesStyle -> {FontSize -> 20, LineColor -> Blue}, 

Grid @ Partition[{Plot[Sin[x], {x, 0, 2 Pi}], 
   LogPlot[x^5, {x, 0, 100}], 
   BarChart[{1, 2, 3}], 
   ContourPlot[x y, {x, 0, 1}, {y, 0, 1}, Frame -> False, Axes -> True]}, 2]

enter image description here

enter image description here


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.