1 from replot import imshow
5 # meshgrid is a handy numpy command for creating x and y coordinate
6 # arrays for a 2-D grid
7 xx, yy = meshgrid(linspace(0, 2*pi, 100), linspace(0, 2*pi, 100))
9 # To get an idea of what these arrays look like, let's look at
10 # their upper left corners
14 # Now use the coordinate arrays to display a function over the range
16 imshow(sin(xx) * cos(2 * yy))
18 # You can use any of the keyword arguments from:
19 # http://matplotlib.sourceforge.net/matplotlib.axes.html#Axes-imshow
21 imshow(sin(xx) * cos(2 * yy),
22 cmap=matplotlib.cm.copper,
23 extent=(0,2*pi,0,2*pi))