I think the problem is caused by the image compositing logic in the
Axes.draw() method.
It currently makes a composite image first and then flip the resulting
image  if necessary.
But I think what should happen is to flip the original images first
and then do the compositing.
So, test the attached patch and see if it solves the problem.

Regards,

-JJ


On Sat, Nov 8, 2008 at 7:53 AM, John Hunter <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 7, 2008 at 7:24 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote:
>> John Hunter wrote:
>>>
>>> What say you other developers -- any major holdups?
>>
>> I think this bug is reasonably serious, if anyone wants to take a look at
>> it.  It affects PDF, PS, SVG as well as the Gtk and GtkCairo mentioned in
>> the report.  I've taken a kick at it a couple of times, but haven't found
>> the magic incantation.  I suspect it's a one-liner fix, just don't know
>> which one... ;)
>>
>> https://sourceforge.net/tracker/index.php?func=detail&aid=2160909&group_id=80706&atid=560720
>
> I spent some time trying to fix this yesterday, and I too was
> confounded by all the flipud_out calls in the various parts of the
> code.  I was not able to figure ot why agg was working and svg not,
> since they appear to be making similar calls, and eventually had to
> give up to work on some other stuff.  I'll try and find some time this
> weekend to plan another attack, and hopefully simplify and document
> the code a bit if I am successful.
>
> JDH
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
Index: lib/matplotlib/axes.py
===================================================================
--- lib/matplotlib/axes.py	(revision 6377)
+++ lib/matplotlib/axes.py	(working copy)
@@ -1536,15 +1536,16 @@
             ims = [(im.make_image(mag),0,0)
                    for im in self.images if im.get_visible()]
 
-
+            #flip the images if their origin is "upper"
+            [im.flipud_out() for _im, (im,_,_) in zip(self.images, ims) \
+             if _im.origin=="upper"]
+            
             l, b, r, t = self.bbox.extents
             width = mag*((round(r) + 0.5) - (round(l) - 0.5))
             height = mag*((round(t) + 0.5) - (round(b) - 0.5))
             im = mimage.from_images(height,
                                     width,
                                     ims)
-            if self.images[0].origin=='upper':
-                im.flipud_out()
 
             im.is_grayscale = False
             l, b, w, h = self.bbox.bounds
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to