Search code examples
pythonpandasmatplotlibhistogramoverlap

How to avoid overlapping between plot titles and axis titles in histogram subplots in pandas?


I have this plot made in pandas:

enter image description here

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.


Solution

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