Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

matplotlib colormap transparent white to black

from matplotlib.colors import ListedColormap

cmap = np.zeros([256, 4])
cmap[:, 3] = np.linspace(0, 1, 256)
cmap = ListedColormap(cmap)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #matplotlib #colormap #transparent #white #black
ADD COMMENT
Topic
Name
7+9 =