How to remove white space at the bottom of matplotlib graph?

Viewed 10563

I looked over the matplotlib user guide and cant seem to find a way to remove the white space that is generated at the bottom of my graph.

fig = plt.figure(1,figsize=(5,10))
axis = fig.add_subplot(211, autoscale_on=False,xlim=(1,10),ylim=(0,1))

Are the configurations I am using on the graph. I tried using frameon=False, but didnt notice it do anything. I would like the graph to take up the entire size of the output image.

Here is the photo: Notice that half the graph is half white space at the bottom.

I want to remove all this white space. Both the answers provided do not do this... am I missing something else?

5 Answers
Related