fig.savefig matplotlib code example
Example: savefig matplotlib python
import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3],[1,2,3])
plt.savefig("out.png")
import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3],[1,2,3])
plt.savefig("out.png")