Skip to content

Instantly share code, notes, and snippets.

@yfe404
Created October 10, 2017 13:12
Show Gist options
  • Save yfe404/dbe5d912b0c7e8f6f8e606c3a842236f to your computer and use it in GitHub Desktop.
Save yfe404/dbe5d912b0c7e8f6f8e606c3a842236f to your computer and use it in GitHub Desktop.
robo-matplotlib-image-reading
# Import some packages from matplotlib
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
# Uncomment the next line for use in a Jupyter notebook
#%matplotlib inline
# Define the filename, read and plot the image
filename = 'sample.jpg'
image = mpimg.imread(filename)
plt.imshow(image)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment