14

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,376
  • 4
  • 33
  • 53
user1551817
  • 5,613
  • 18
  • 63
  • 97
  • 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

19

just add the following:

plt.tight_layout()

I hope it helps. Link to documentation.

NerdOnTour
  • 396
  • 1
  • 11
Emm
  • 441
  • 5
  • 11