I suspect the fix is as simple as twiddling a single line of code, it's
just not obvious to me how the image flipping is supposed to work to
have consistent behavior across backends -- and I hope another developer
here has a clue...
I suspect this is related to the problem described at
http://thread.gmane.org/gmane.comp.python.matplotlib.general/14420
The problem does not seem to be alignment but that the image is rendered
upside down. The PDF backend does
img.flipud_out()
# get rgba data of image and write it in the output file
img.flipud_out()
and if I comment out the flipud_out calls, I get that particular case
right but then the image_origin example is wrong.
Revision 5618 added a flipud_out call to Axes.draw:
if self.images[0].origin=='upper':
im.flipud_out()
The log message is:
···
------------------------------------------------------------------------
r5618 | jdh2358 | 2008-06-20 20:09:12 +0300 (Pe, 20 Kes 2008) | 1 line
Changed paths:
M /trunk/matplotlib/examples/api/mathtext_asarray.py
M /trunk/matplotlib/examples/pylab_examples/figimage_demo.py
M /trunk/matplotlib/lib/matplotlib/axes.py
M /trunk/matplotlib/lib/matplotlib/backends/backend_gtkagg.py
M /trunk/matplotlib/lib/matplotlib/figure.py
M /trunk/matplotlib/src/_gtkagg.cpp
M /trunk/matplotlib/src/_image.cpp
added origin support for composite images
------------------------------------------------------------------------
I think this was discussed further in some emails between me, Haibao
Tang, and John Hunter, but at least I have been too busy to spend much
time on matplotlib lately. I hope this helps somebody track the bug
down.
Jouni