小编Stu*_*Stu的帖子

如何在matplotlib中更改图例字体名称

我想在matplotlib图的传说中显示Times New Roman中的字体.我已将所有其他刻度标签/轴标签/标题更改为Times New Roman,并搜索了文档,但我只能找到如何使用prop 参数更改图例中的字体大小pyplot.legend()

谢谢

当然,在发布后,我找到了答案.针对同一问题的其他人的解决方案:
import matplotlib as mpl
mpl.rc('font',family='Times New Roman')

python matplotlib legend legend-properties

13
推荐指数
3
解决办法
2万
查看次数

标签 统计

legend ×1

legend-properties ×1

matplotlib ×1

python ×1