为什么在matplotlib图中我的xlabel被截断了?

为什么在matplotlib图中我的xlabel被截断了?,第1张

为什么在matplotlib图中我的xlabel被截断了?

采用:

import matplotlib.pyplot as pltplt.gcf().subplots_adjust(bottom=0.15)

为标签腾出空间

编辑:

自从我给出答案以来,

matplotlib
增加了
tight_layout()
功能。所以我建议使用它:

plt.tight_layout()

应该为xlabel腾出空间



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5643561.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存