one of the things which has been bugging me in my recent conversion to mpl has been the lack of a good matrix display routine, which would plot the arrays with 'upper' origin but row-descending numbers, and which would satisfy the colliding constraints of no stretching, a window with the aspect ratio of the original array, all within reasonable window sizes.
imshow, figimage and pcolor all fail to do this in different ways. So I'm attaching here a new routine, which roughly does what I want (with current CVS code, since it needs my new figure() patch). I called it matshow, for lack of a better name. If you run the attached script via %run in a pylab session, it will display various arrays.
I think the functionality is a good improvement over the existing image-related display routines (I need something like this from day 1 if I'm to use matplotlib), but I have some doubts about my implementation. I poked around inside matplotlib for a while, trying to finesse this functionality into imshow() itself, but I got hopelessly lost. Perhaps a better coder than me can make it work, if y'all think the functionality is worth having.
If people don't mind the implementation, I guess I'd like to see it included (perhaps with a better name, and after a good review by the experts). The docstring contains some notes about improvements I don't know how to make, and the code is heavily commented.
matshow.py (2.59 KB)