Revision: 8098
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8098&view=rev
Author:   ryanmay
Date:     2010-01-28 19:09:20 +0000 (Thu, 28 Jan 2010)

Log Message:
-----------
Support setting zorder keyword for ContourSet.

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/contour.py

Modified: trunk/matplotlib/lib/matplotlib/contour.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/contour.py  2010-01-25 20:31:41 UTC (rev 
8097)
+++ trunk/matplotlib/lib/matplotlib/contour.py  2010-01-28 19:09:20 UTC (rev 
8098)
@@ -695,10 +695,13 @@
 
                 paths = self._make_paths(segs, kinds)
 
+                # Default zorder taken from Collection
+                zorder = kwargs.get('zorder', 1)
                 col = collections.PathCollection(paths,
                                      antialiaseds = (self.antialiased,),
                                      edgecolors= 'none',
-                                     alpha=self.alpha)
+                                     alpha=self.alpha,
+                                     zorder=zorder)
                 self.ax.add_collection(col)
                 self.collections.append(col)
         else:
@@ -710,10 +713,14 @@
                 nseg = len(nlist)//2
                 segs = nlist[:nseg]
                 #kinds = nlist[nseg:]
+
+                # Default zorder taken from LineCollection
+                zorder = kwargs.get('zorder', 2)
                 col = collections.LineCollection(segs,
                                      linewidths = width,
                                      linestyle = lstyle,
-                                     alpha=self.alpha)
+                                     alpha=self.alpha,
+                                     zorder=zorder)
 
                 col.set_label('_nolegend_')
                 self.ax.add_collection(col, False)
@@ -1228,4 +1235,3 @@
                     ymin = lc[imin,1]
 
         return (conmin,segmin,imin,xmin,ymin,dmin)
-


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

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to