【发布时间】:2014-09-09 13:21:29
【问题描述】:
在 matplotlib 中, 如何全局更新注释框字体大小?
我正在努力
matplotlib.rcParams.update({'axes.annotate.fontsize': 13})
但它不起作用
【问题讨论】:
-
“注释框”到底是什么意思?图例等,或者用
annotate方法放置的东西?如果你想把所有字体都变大,可以更新font.size。 -
是的,我希望使用
annotate(matplotlib.org/users/annotations_intro.html) 方法的字体更小。我使用了font.size,但它会更新所有字体。到目前为止,我只是在ax.annotate中指定fontsize= -
遗憾的是,无法仅更改
annotate的默认文本大小。正如您所注意到的,font.size旨在改变一切。如果你真的想要,你可以猴子补丁annotate,但在你的注释调用中明确指定size(或fontsize,它们是等效的)可能是一个更好的选择。
标签: matplotlib annotations global-variables font-size