I attached a slightly modified version of the image_nonuniform.py. I
additionally inverted the y-limits in the extent-kwarg and in the set_data of
the last example. I'm not sure why this is needed and if there is a better
solution to it, but at least for me it works.
Does anybody know why we have to invert all data concerning y-axis?
image_nonuniform_mod.py (1.3 KB)
On Wednesday July 7 2010 05:53:59 jezhill wrote:
I've been experimenting with the NonUniformImage class. (Actually I want
*uniform* pixel spacing, but I want the image x and y coordinates to have
the correct *scaling* in the style of Matlab's image(x,y,C). The
AxesImage class, created via pylab.imshow, didn't seem to offer that, so I
landed on NonUniformImage, but if there's a better solution I'd be
grateful for tips...)
And here's the problem (or bug?): with my Python 2.5.4 and my matplotlib
1.0, I go and run the
html gallery demo but I decide that I want the y axis reversed (as is
common in image visualization). So I either call
pylab.gca().invert_yaxis() at the end, or I change one of the lines that
which I believe is the approved method. However the result I get is
non-sensical: no more image variation in the vertical direction. Can
anyone tell me what, if anything, I'm doing wrong?