
Img2 = plt. # here it is progressive, but you can create whathever you want

This module includes functions and classes for color specification conversions, and for mapping numbers to colors in a 1-D array of colors called a colormap. RGB and RGBA are sequences of, respectively, 3 or 4 floats in the range 0-1. # create your alpha array and fill the colormap with them. A module for converting numbers or color arguments to RGB or RGBA.
#Colorconverter matplotlib how to#
Then initialize this colormap object: this will cause it to internally create an array called "_lut" which holds rgba values. Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java.

Or create your own colormap as you did, if the colormap you want doesn't already exist.

In your example, img3 = plt.imshow(zvals2, interpolation='nearest', cmap=cmap2, origin='lower', alpha=0.6) EDIT: You can set the alpha argument in your imshow command.
