问题描述
是否可以立即重新缩放所有字体大小(图例,记号标签,轴标签…)?
is there a way to rescale all the fontsizes (legend, tickslabels, axislabels…) at once?
松弛.
推荐答案
个人字体大小可以通过titlefontsize
,tickfontsize
,legendfontsize
,tickfontsize
,guidefontsize
和legendtitlefontsize
属性进行控制,但我知道这可能很乏味.还有thickness_scaling
属性.
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 / α)
由丹尼尔·施瓦本德在Slack上回答.
Answer by Daniel Schwabeneder on Slack.
这篇关于如何使用Plots.jl缩放字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!