Matplotlib (pyplot) savefig outputs blank image
First, what happens when
T0 is not None? I would test that, then I would adjust the values I pass to
plt.subplot(); maybe try values 131, 132, and 133, or values that depend whether or not
plt.show() is called, a new figure is created. To deal with this, you can
plt.savefig('tessstttyyy.png', dpi=100)before you call
Save the figure before you
plt.gcf()for "get current figure", then you can call
Figureobject at any time.
fig1 = plt.gcf()plt.show()plt.draw()fig1.savefig('tessstttyyy.png', dpi=100)
In your code, 'tesssttyyy.png' is blank because it is saving the new figure, to which nothing has been plotted.