Skip to content

Instantly share code, notes, and snippets.

@amiller
Created April 30, 2011 20:39
Show Gist options
  • Save amiller/949976 to your computer and use it in GitHub Desktop.
Save amiller/949976 to your computer and use it in GitHub Desktop.
import numpy as np
import pylab
img = np.empty((480,640,3),'u1')
# Draw horizontal stripes yellow
img[(120,240,360),:,:] = (255,255,0)
# Draw vertical stripes purple
img[:,(160,320,480),:] = (255,0,255)
pylab.imshow(img)
pylab.waitforbuttonpress()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment