Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d53220d

Browse files
committed
In ScalarMappable.to_rgba(), don't convert rgb array to masked array.
svn path=/trunk/matplotlib/; revision=2068
1 parent 43288e0 commit d53220d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/matplotlib/cm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ def set_colorbar(self, im, ax):
4949

5050
def to_rgba(self, x, alpha=1.0):
5151
# assume normalized rgb, rgba
52-
#print '0', type(x), x.shape
53-
x = ma.asarray(x)
54-
#print '1', type(x), x.shape
5552
if len(x.shape)>2: return x
53+
x = ma.asarray(x)
5654
x = self.norm(x)
5755
x = self.cmap(x, alpha)
5856
return x

0 commit comments

Comments
 (0)