Save Images
Libraries¶
In [2]:
import numpy as np
import matplotlib.pyplot as plt
Create a image to save¶
In [6]:
img = np.random.randint(0, 255, (64, 64))
img
Out[6]:
Show an image¶
In [9]:
plt.imshow(img);
plt.axis('off');
Save an image as png¶
In [33]:
plt.savefig('../images/savefig_sample_image.png')
In [36]:
!ls ../images | grep image.png
Comments
Comments powered by Disqus