[SciPy-dev] Patch for broken scipy.plt.plot_objects.py

eric eric at scipy.org
Tue Jan 22 12:17:53 EST 2002


Hey Alex,


> I didn't find anything specific on the www.scipy.org on how to submit
patches,
> so I hope submitting them here is OK.

Seems as good a place as any for now.

> I hit upon a bug in plt.imagesc, that took me quite a long time to track
> down. Basically, it won't display any non-square matrices correctly.
However,
> reshaping a flat array (which I happen to mostly work with), incorrectly
> (i.e. reshape(a.flat,(col, row)) instead of reshape(a.flat, (row, col))),
will
> result in the plot one expected. I was therefore quite dumbfounded when I
> found that plt.imagesc(reshape(a.flat,(col, row))) worked but
> plt.imagesc(transpose(reshape(a.flat,(col,row)))) produced garbage.
>
> Here is a fix (plus anoter small change), which I hope should work.

All looks good.  Thanks.  I've added the patch to the current CVS.

eric





More information about the SciPy-Dev mailing list