pcolor bug?

Hi,

I think I might have noticed an off by one bug in the pcolor and
pcolor_classic functions. To replicate the problem:

from matplotlib.matlab import *
import Numeric
pcolor(Numeric.transpose(rand(2,2)))

** Note that although this is a 2x2 matrix the pcolor plot is rendered
   with only 1 square. This problem scales. The dimensions of the pcolor
   plots are always 1 less than they should be.

Changing line 1306 in axes.py (I'm running the debian package ver. 0.61.0-2)

from:
  X, Y = meshgrid(arange(numCols), arange(numRows) )

to:
  X, Y = meshgrid(arange(numCols+1), arange(numRows+1) )

And I think similar change can fix pcolor_classic too.

This fixes the off-by-one problem when plotting arrays. I haven't
thoroughly tested this, but I think it works in all cases.

  --chris.

PS. Thanks for the nice work on matplotlib.

···

----------------------
Christopher Hart
Caltech Biology