pcolor bug?


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

** 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)

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

  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.


PS. Thanks for the nice work on matplotlib.


Christopher Hart
Caltech Biology