Use set_size_inches
, for example:
import matplotlib.pyplot as plt fig=plt.figure() ax=fig.add_subplot(111) fig.set_size_inches([10,10]) ax.plot([1,3,2],[2,2,2],'ro-') plt.savefig('10x10.png') fig.set_size_inches([4,4]) plt.savefig('4x4.png')
ev-br source share