【问题标题】:How to adjust xticks labels while plotting如何在绘图时调整 xticks 标签
【发布时间】:2020-11-17 16:21:46
【问题描述】:

如下图所示,旋转后的 xticks 在标签中间打勾。 [1]:https://i.stack.imgur.com/ZE3ew.png 相反,我希望它最后打勾,以免重叠。 得到这个的代码是

sns.heatmap(cov,annot=True)
plt.xticks(rotation=45)[enter image description here][1]

【问题讨论】:

    标签: python matplotlib axis-labels xticks


    【解决方案1】:

    this link 会回答你的问题吗?

    plt.xticks(rotation=45, 
               horizontalalignment='right',
               fontweight='light'  
               )
    

    【讨论】:

      猜你喜欢
      • 2014-07-22
      • 1970-01-01
      • 1970-01-01
      • 2021-07-08
      • 1970-01-01
      • 2012-08-29
      • 1970-01-01
      • 2014-09-14
      • 2021-03-29
      相关资源
      最近更新 更多