saving image in python matplotlib code example
Example: matplotlib export image
from matplotlib import pyplot as plt
plt.savefig('foo.png')
plt.savefig('foo.pdf')
from matplotlib import pyplot as plt
plt.savefig('foo.png')
plt.savefig('foo.pdf')