Python: A4 size for a plot

Try to set the size of the figure (in inches) before you save it. You can do this when you initialize the figure by doing:

figure(figsize=(11.69,8.27)) # for landscape

or if the figure exists:

f = gcf()  # f = figure(n) if you know the figure number
f.set_size_inches(11.69,8.27)

or in advance for all plots, using

rc('figure', figsize=(11.69,8.27))

Leave a Comment