I am using pylab in matplotlib to create a plot and save the plot to an image file. However, when I save the image using pylab.savefig( image_name ), I find that the SIZE image saved is the same as the image that is shown when I use pylab.show().
As it happens, I have a lot of data in the plot and when I am using pylab.show(), I have to maximize the window before I can see all of the plot correctly, and the xlabel tickers don’t superimpose on each other.
Is there anyway that I can programmatically ‘maximize’ the window before saving the image to file? – at the moment, I am only getting the ‘default’ window size image, which results in the x axis labels being superimposed on one another.
You set the size on initialization:
Edit:
If the problem is with x-axis ticks – You can set them “manually”:
And so on with other aspects of Your plot. You can configure it all. Here’s an example:
So – what exactly do You want to be configured?