如何避免 pandas 的直方图子图中的绘图标题与轴标题重叠? [英] How to avoid overlapping between plot titles and axis titles in histogram subplots in pandas?

查看:77
本文介绍了如何避免 pandas 的直方图子图中的绘图标题与轴标题重叠?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这只大熊猫做的情节

I have this plot made in pandas:

我想在地块的标题和后面的地块之间留出更多的空间,以免重叠.我已经尝试过以下问题的解决方案用matplotlib中有许多子图,但是它们对我的情节都没有任何帮助.

I want to have more space between the titles of the plots and the axis of the following ones, so that they dont overlap. I have tried the solutions of the question Improve subplot size/spacing with many subplots in matplotlib but none of them makes nothing to my plot.

推荐答案

绘制所有图形后即可使用plt.tight_layout().这样可以避免手动操作间距.

You can use plt.tight_layout() after plotting all the figures. This avoids manually playing around with the spacing.

这篇关于如何避免 pandas 的直方图子图中的绘图标题与轴标题重叠?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆