[Python] matplotlib 绘图坐标轴标题显示不全

实干、实践、积累、思考、创新。


发现采用matplotlib绘图,坐标轴刻度太长时,坐标轴标题显示不全或者退距异常的情况,如下图。

解决办法很简单,只需要增加下面一行代码即可:

plt.tight_layout()


You already voted!

  • 相关博文( Related Topics)

[01]. Python 出现”invalid literal for int() with base 10: \xef\xbb\xbf0″ 错误

[02]. [编程笔记] Tuple in Python [Python中的元组]

[03]. [Python][编程][笔记] Python海龟绘图 —— 多边形 Polygon

[04]. [Python][编程][笔记] Python符号计算——求偏微分方程 (Python symbolic computation — solving partial differential equations)

[05]. [Python] 安装PyOpenGL笔记

[06]. [编程][笔记] Python中numpy的求和

[07]. [Python] matplotlib 绘图坐标轴标题显示不全


结构|超限|软件开发|编程|参数化|优化|算法|振动控制|减隔震|有限元|技术培训

追求卓越 脚踏实地 致力于探索和拓展行业设计前沿

WeChat_QRCode

https://www.jdcui.com

合作及技术咨询

COOPERATION & CONTACT

E-mail:jidong_cui@163.com

WeChat & Tel: 13450468449

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.