From: <lee...@us...> - 2009-06-19 04:33:45
|
Revision: 7226 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7226&view=rev Author: leejjoon Date: 2009-06-19 04:33:44 +0000 (Fri, 19 Jun 2009) Log Message: ----------- fix sf bug 2806283 (patch by Joonas Paalasmaa) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/colorbar.py Modified: trunk/matplotlib/lib/matplotlib/colorbar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colorbar.py 2009-06-17 02:18:39 UTC (rev 7225) +++ trunk/matplotlib/lib/matplotlib/colorbar.py 2009-06-19 04:33:44 UTC (rev 7226) @@ -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 = ''' @@ -626,9 +627,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 @@ -639,6 +641,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. |