问题
is there a way to rescale all the fontsizes (legend, tickslabels, axislabels…) at once?
Original question from Filippo Vicentini on Slack.
回答1:
Individual font sizes can be controlled with the titlefontsize
, tickfontsize
, legendfontsize
, tickfontsize
, guidefontsize
and legendtitlefontsize
attributes, but I get that this can be quite tedious.
There is also the thickness_scaling
attribute.
plot(rand(10), thickness_scaling = 0.5)
However, this also affects the line widths. The third option is to call
Plots.scalefontsizes(α)
to scale all font sizes by a factor α
. This changes the global fontsize defaults for all subsequent plots and can be undone with
Plots.scalefontsizes(1 / α)
Answer by Daniel Schwabeneder on Slack.
来源:https://stackoverflow.com/questions/57976378/how-to-scale-the-fontsizes-using-plots-jl