get the list of figures in matplotlib,plt.savefig('figure%d.png' % i)