matplotlib.colors.
ListedColormap
(colors, name='from_list', N=None)[source]¶Colormap object generated from a list of colors.
This may be most useful when indexing directly into a colormap, but it can also be used to generate special colormaps for ordinary mapping.
Make a colormap from a list of colors.
the number of entries in the map. The default is None, in which case there is one colormap entry for each element in the list of colors. If:
N < len(colors)
the list will be truncated at N. If:
N > len(colors)
the list will be extended by repetition.