18

I have created a figure in python which contains multiple subplots. I have also added various axis labels to some of the axes on the figures. For examples:

plt.xlabel('Phase ($^\circ$)',fontsize=10)

I notice though, that when the final figure is produced, the other subplots are allowed to overlap and obscure the words of the axis labels.

Is there a way that I can stop this happening?

lucasg
  • 10,734
  • 4
  • 35
  • 57
user1551817
  • 6,693
  • 22
  • 72
  • 109
  • 2
    Have you seen the answer to [this question](http://stackoverflow.com/questions/5159065/need-to-add-space-between-subplots-for-x-axis-label-maybe-remove-labelling-of-a)? Perhaps that may help. – Siddharth Toshniwal Nov 05 '12 at 08:23

1 Answers1

23

just add the following:

plt.tight_layout()

I hope it helps. Link to documentation.

NerdOnTour
  • 634
  • 4
  • 15
Emm
  • 491
  • 5
  • 11