from pylab import * #@UnusedWildImport
palette = cm.gray
palette.set_under(color = 'r', alpha = 0.0 )
print palette([-1, # under: red but with alpha zero.
0, # black with alpha 1
0.5, # grey with alpha 1
1, # white with alpha 1
],
# alpha=0
)
I expected:
[[ 1. 0.
2009-11-04 15:29:34 UTC in matplotlib