MCPcopy Create free account
hub / github.com/TPCD/DCCL / get_cmap

Function get_cmap

project_utils/visualization_utils.py:22–25  ·  view source on GitHub ↗

Returns a function that maps each index in 0, 1, ..., n-1 to a distinct RGB color; the keyword argument name must be a standard mpl colormap name.

(n, name='hsv')

Source from the content-addressed store, hash-verified

20 return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
21
22def get_cmap(n, name='hsv'):
23 '''Returns a function that maps each index in 0, 1, ..., n-1 to a distinct
24 RGB color; the keyword argument name must be a standard mpl colormap name.'''
25 return plt.cm.get_cmap(name, n)
26
27
28def plot_with_labels(save_path, lowDWeights, labels, camid):

Callers 4

plot_with_labelsFunction · 0.85
plot_2D_embeddingFunction · 0.85
plot_2D_embedding_maskFunction · 0.85
plot_without_labelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected