matplotlib plot to image code example
Example 1: show image in matplotlib
%pylab inline
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('your_image.png')
imgplot = plt.imshow(img)
plt.show()
Example 2: save matplotlib figure
plt.savefig('image.png')