如何使用 Plots.jl 缩放字体大小 [英] How to scale the fontsizes using Plots.jl

查看:16
本文介绍了如何使用 Plots.jl 缩放字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

is there a way to rescale all the fontsizes (legend, tickslabels, axislabels…) at once?

Original question from Filippo Vicentini on Slack.

解决方案

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.

这篇关于如何使用 Plots.jl 缩放字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆