Revision: 7227
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7227&view=rev
Author:   leejjoon
Date:     2009-06-19 04:39:24 +0000 (Fri, 19 Jun 2009)

Log Message:
-----------
fix sf bug 2806283 (patch by Joonas Paalasmaa)

Modified Paths:
--------------
    branches/v0_98_5_maint/lib/matplotlib/colorbar.py

Modified: branches/v0_98_5_maint/lib/matplotlib/colorbar.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/colorbar.py   2009-06-19 04:33:44 UTC 
(rev 7226)
+++ branches/v0_98_5_maint/lib/matplotlib/colorbar.py   2009-06-19 04:39:24 UTC 
(rev 7227)
@@ -29,6 +29,7 @@
 import matplotlib.patches as patches
 import matplotlib.collections as collections
 import matplotlib.contour as contour
+import matplotlib.artist as martist
 
 make_axes_kw_doc = '''
 
@@ -625,9 +626,10 @@
         self.mappable = mappable
         kw['cmap'] = mappable.cmap
         kw['norm'] = mappable.norm
-        kw['alpha'] = mappable.get_alpha()
+
         if isinstance(mappable, contour.ContourSet):
             CS = mappable
+            kw['alpha'] = mappable.get_alpha()
             kw['boundaries'] = CS._levels
             kw['values'] = CS.cvalues
             kw['extend'] = CS.extend
@@ -638,6 +640,9 @@
             if not CS.filled:
                 self.add_lines(CS)
         else:
+            if isinstance(mappable, martist.Artist):
+                kw['alpha'] = mappable.get_alpha()
+
             ColorbarBase.__init__(self, ax, **kw)
 
 


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

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to