How to scale the fontsizes using Plots.jl

梦想与她 提交于 2021-01-28 01:36:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!