Skip to content

Instantly share code, notes, and snippets.

@keimina
Created December 14, 2013 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keimina/7955422 to your computer and use it in GitHub Desktop.
Save keimina/7955422 to your computer and use it in GitHub Desktop.
# 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