Revision: 7950
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7950&view=rev
Author:   astraw
Date:     2009-11-10 21:03:51 +0000 (Tue, 10 Nov 2009)

Log Message:
-----------
use image zorder when drawing

Modified Paths:
--------------
    trunk/matplotlib/CHANGELOG
    trunk/matplotlib/lib/matplotlib/axes.py

Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG  2009-11-07 13:29:12 UTC (rev 7949)
+++ trunk/matplotlib/CHANGELOG  2009-11-10 21:03:51 UTC (rev 7950)
@@ -1,3 +1,12 @@
+2009-11-10 Single images, and all images in renderers with
+           option_image_nocomposite (i.e. agg, macosx and the svg
+           backend when rcParams['svg.image_noscale'] is True), are
+           now drawn respecting the zorder relative to other
+           artists. (Note that there may now be inconsistencies across
+           backends when more than one image is drawn at varying
+           zorders, but this change introduces correct behavior for
+           the backends in which it's easy to do so.)
+
 2009-10-21 Make AutoDateLocator more configurable by adding options
            to control the maximum and minimum number of ticks. Also
            add control of the intervals to be used for ticking. This

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py     2009-11-07 13:29:12 UTC (rev 
7949)
+++ trunk/matplotlib/lib/matplotlib/axes.py     2009-11-10 21:03:51 UTC (rev 
7950)
@@ -1721,7 +1721,8 @@
 
         if len(self.images)<=1 or renderer.option_image_nocomposite():
             for im in self.images:
-                im.draw(renderer)
+                dsu.append( (im.zorder, len(dsu), im) )
+            dsu.sort() # re-sort with images now
         else:
             # make a composite image blending alpha
             # list of (mimage.Image, ox, oy)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to