gncpy.plotting.get_cmap
- get_cmap(n, name='Dark2')[source]
Returns a function that generates a color map.
Returns a function thata maps each index in 0, 1, …, n-1 to a distinct RGB color; the keyword argument name must be a standard mpl colormap name.
- Parameters:
n (int) – Number of colors in the map.
name (string) – name of the colormap, valid for pyplot.cm.get_cmap function