This is a very simple question but I must misunderstand the use of pyplot and figure or something else. I'm plotting some images and would like to save them instead of just showing them and saving them by hand. So far I've tried:
import matplotlib.pyplot as plt
fig = plt.figure()
plt.plot(d,c1[0:100],'b--',d,c2[0:100],'r--',d,c3[0:100],'g--',figure = fig)
plt.ylabel("concentration")
plt.xlabel("distance")
plt.show()
plt.savefig('./Results/evol_conc_v'+str(vinit)+'a_'+str(a)+'.png')
The file created is blank, but the image showed was good. The existing similar question don't seem to apply.