Have a look at the following python example:
import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['figure.figsize'] = [8.27, 11.69] fig = plt.figure() plt.show() # This line causes problems with figsize fig.savefig('test.pdf')
If I use "plt.show ()" the size of the test.pdf figure changes a lot (from
What do I need to do to keep it constant?
There is a good demo on adjusting image size in matplotlib shapes on a SciPy site .
show() , matplotlib . , TkAgg ( ), 12 . WXAgg, .
show()
, , show(), . , , , .
, , reset pdf. :.
fig.set_size_inches(8.27, 11.69) fig.savefig('test.pdf')