From: <md...@us...> - 2008-03-18 18:35:20
|
Revision: 5003 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5003&view=rev Author: mdboom Date: 2008-03-18 11:35:10 -0700 (Tue, 18 Mar 2008) Log Message: ----------- Fixing set_alpha bug when there is no facecolors (thanks Michael Fitzgerald) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/collections.py Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2008-03-14 12:22:28 UTC (rev 5002) +++ trunk/matplotlib/lib/matplotlib/collections.py 2008-03-18 18:35:10 UTC (rev 5003) @@ -153,7 +153,7 @@ if self.have_units(): paths = [] - for path in self._paths: + for path in self.get_paths(): vertices = path.vertices xs, ys = vertices[:, 0], vertices[:, 1] xs = self.convert_xunits(xs) @@ -305,7 +305,8 @@ except TypeError: raise TypeError('alpha must be a float') else: artist.Artist.set_alpha(self, alpha) - self._facecolors[:, 3] = alpha + if len(self._facecolors): + self._facecolors[:, 3] = alpha self._edgecolors[:, 3] = alpha def get_linewidths(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |