9951 explained code solutions for 126 technologies


python-matplotlibHow to export image


import matplotlib.pyplot as plt
plt.plot([1,3,2])
plt.savefig('plot.png')ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

savefig(

saves chart to the specified image file

plot.png

image file to save chart to