nonuniform meshes

Can matplotlib do image plots of a nonuniform mesh? from

    > matplotlib.matlab import *

    > x=array([0.,0.5,0.51,4.]) y=array([0.,1.]) X,Y =
    > meshgrid(x,y) Z=array([[0,1,1,2],[0,1,1,2]]) im =
    > 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)