【问题标题】:how to adjust font size on histogram in python如何在python中调整直方图的字体大小
【发布时间】:2020-12-12 00:36:11
【问题描述】:

我使用 df.hist() 创建了直方图,但不知何故,我的轴的字体大小太大了。如何调整大小?

Current plot output with large fonts

【问题讨论】:

    标签: python pandas python-3.7


    【解决方案1】:

    将坐标区标签大小传递给df.hist(),如下所示:

    df.hist(xlabelsize=8, ylabelsize=10)

    请参阅 pandas.DataFrame.hist() here 的文档

    【讨论】:

      猜你喜欢
      • 2011-04-05
      • 1970-01-01
      • 1970-01-01
      • 2013-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-15
      相关资源
      最近更新 更多