1

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.

Javier Lopez Tomas
  • 2,072
  • 3
  • 19
  • 41

1 Answers1

14

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

Sheldore
  • 37,862
  • 7
  • 57
  • 71
  • 1
    Doing so destroys the aspect ratio of my subplots. Previously they're squares, then after `plt.tight_layout()`, they're rectangles. Do you know how to prevent this? – Rylan Schaeffer May 15 '22 at 22:38