cityImage.rand_cmap#
- cityImage.rand_cmap(nlabels, type_color='soft')[source]#
It generates a categorical random color map, given the number of classes
- Parameters:
nlabels (int) – The number of categories to be coloured.
type_color (str {"soft", "bright"}) – It defines whether using bright or soft pastel colors, by limiting the RGB spectrum.
- Returns:
cmap – The color map.
- Return type:
matplotlib.colors.LinearSegmentedColormap