sidpy.viz.plot_utils.cmap.discrete_cmap¶
- sidpy.viz.plot_utils.cmap.discrete_cmap(num_bins, cmap=None)[source]¶
Create an N-bin discrete colormap from the specified input map specified
- Parameters:
num_bins (unsigned int) – Number of discrete bins
cmap (matplotlib.colors.Colormap object) – Base color map to discretize
- Returns:
new_cmap – Discretized color map
- Return type:
matplotlib.colors.LinearSegmentedColormap object
Notes
Jake VanderPlas License: BSD-style https://gist.github.com/jakevdp/91077b0cae40f8f8244a