|
From: John H. <jdh...@ac...> - 2004-12-30 20:23:25
|
>>>>> "Randy" == Randy Heiland <he...@in...> writes:
Randy> Can matplotlib do image plots of a nonuniform mesh? from
Randy> matplotlib.matlab import *
Randy> x=array([0.,0.5,0.51,4.]) y=array([0.,1.]) X,Y =
Randy> meshgrid(x,y) Z=array([[0,1,1,2],[0,1,1,2]]) im =
Randy> imshow(Z,cmap=cm.jet) show()
Yes, but note that the pcolor has numrows-1 rows and numcols-1 cols
since the endpoints must be specified in your X,Y arrays
x = array([0.,0.5,0.6,4.])
y = array([0.,1.,4])
X,Y = meshgrid(x,y)
Z = array([[0,1,2,2],[0,1,1,2],[2,0,1,2]])
pcolor(X, Y, Z, cmap=cm.jet)
JDH
|