Created
October 10, 2017 13:12
-
-
Save yfe404/dbe5d912b0c7e8f6f8e606c3a842236f to your computer and use it in GitHub Desktop.
robo-matplotlib-image-reading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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