How can I save a plot in a png image? In my code i image the plot like this:
plt.title(('FRC_Network_Coordinates_ID_{}_r_{}_x_{}_y_{}_z_{}_fcr_{}_co_{}_dt_{}.csv'.format(ID, r, x, y, z, fcr_size,co,dt)))
plt.xlabel('Threshold')
plt.ylabel('Jacaard Coefficient')
plt.plot(np.arange(0,1.1,0.05),JClist)
plt.grid(True)
plt.show()
How can I now store the result of the plot in an image (png)? And is it also possible to store the plots in a list and save all plots in one png or pdf if i for example would have a for loop which creates multiple plots one after another.