cliffgao的个人博客分享 http://blog.sciencenet.cn/u/cliffgao 兴趣:生物信息学、统计、概率

博文

matplotlib 标签超出画布

已有 8716 次阅读 2016-10-3 00:48 |个人分类:python|系统分类:科研笔记

matplotlib  标签超出画布


可在保存图片之前加入这一句:

plt.tight_layout()



参考原文:http://matplotlib.org/users/tight_layout_guide.html


示例图1:

../_images/tight_layout_guide-1.png


To prevent this, the location of axes needs to be adjusted. For subplots, this can be done by adjusting the subplot params (Move the edge of an axes to make room for tick labels). Matplotlib v1.1 introduces a new command tight_layout() that does this automatically for you.

plt.tight_layout()

示例图2

../_images/tight_layout_guide-2.png





https://wap.sciencenet.cn/blog-468005-1006397.html

上一篇:2016 教师节快乐!
下一篇:历届 生物信息学大会
收藏 IP: 132.234.251.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-26 01:17

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部