Created
December 14, 2013 03:40
-
-
Save keimina/7955422 to your computer and use it in GitHub Desktop.
This file contains 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
# convert image to numpy array | |
im = array(Image.open('./data/empire.jpg')) #return numpy array | |
# show | |
imshow(im, interpolation='nearest')#or interpolation='None' | |
# star point | |
x = [100,100,400,400] | |
y = [200,500,200,500] | |
# draw red star | |
plot(x,y,'r*') | |
# draw line (100,100)-(200,500) | |
plot(x[:2],y[:2]) | |
# add title | |
title('Plotting: "empire.jpg"') | |
# dont display axis | |
axis('off') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment