2

I am using Julia notebook and making plots using basic Plots package.

A plot looks good, except its entire size.

Plot without adjusting any size

I can change the plot size and font size of labels individually. But it becomes less readable unless I change the font size and line width for every component.

Plot when I adjust size and xtickfontsize

So is there a way to change the size of a plot as a whole? I also hope I can change it by default.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Hyeon Lee
  • 21
  • 3
  • 2
    Is [this](https://stackoverflow.com/a/57976419/11213215) what you're looking for? Particularly the `Plots.scalefontsize()` function. – rashid Oct 10 '20 at 06:01

1 Answers1

2

To answer your original question in the title, you can change the size of the Plot Window by specifying the size attribute as you already are in your code. See here: http://docs.juliaplots.org/latest/basics/ for more details.

As pointed out by Rashid, you can use the scalefontsize function to scale the font size. You can also scale the thickness by setting the thickness_scaling attribute, see here for more details: http://docs.juliaplots.org/latest/generated/attributes_plot/

To be clear, there is not currently a unified way to scale a plot in the way you are looking for it right now, it has to be done manually (though it would be great to have this unified scaling). I opened a feature request for this here: https://github.com/JuliaPlots/Plots.jl/issues/3153

logankilpatrick
  • 13,148
  • 7
  • 44
  • 125