From: Tony Yu <tsyu80@gm...> - 2008-06-05 23:04:55
When I plot a matrix using pcolor, the size of the boxes don't match
the input (each box is off by about 10% from the input coordinates).
I think the problem is caused by the new draw method in PolyCollection
(added in revision 5403). If I revert to the previous version of
collections.py, the boxes are displayed properly.
The below script is a simple test case. It should print the corners of
the boxes on integer coordinates, but (on my computer, at least), the
corners do not land on integer values.
N = 2
pts = np.arange(0, N+1)
X, Y = np.meshgrid(pts, pts)
col = plt.pcolor(X, Y, np.random.rand(N, N))