|
From: <lee...@us...> - 2009-06-19 04:39:25
|
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.
|