【问题标题】:How do I change the font family of matplotlib bar chart labels? [duplicate]如何更改 matplotlib 条形图标签的字体系列? [复制]
【发布时间】:2018-01-22 14:08:43
【问题描述】:

我正在使用以下行向条形图添加标签,如何调整字体系列?

plt.xticks(xticks_pos, labels,  ha='right', rotation=55, fontsize=20)

【问题讨论】:

    标签: python python-2.7 matplotlib bar-chart font-family


    【解决方案1】:

    您可以使用this question中显示的字体名称。

    plt.xticks(xticks_pos, labels,  ha='right', rotation=55, fontsize=20, fontname='monospace')
    

    【讨论】:

      猜你喜欢
      • 2012-11-16
      • 2018-06-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-11
      • 2020-05-05
      • 2021-09-14
      相关资源
      最近更新 更多