mpl.colors.LinearSegmentedColormap.from_list

static LinearSegmentedColormap.from_list(name, colors, N=256, gamma=1.0)[source]

Make a linear segmented colormap with name from a sequence of colors which evenly transitions from colors[0] at val=0 to colors[-1] at val=1. N is the number of rgb quantization levels. Alternatively, a list of (value, color) tuples can be given to divide the range unevenly.