MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / get_cmap

Function get_cmap

deeplabcut/utils/visualization.py:38–48  ·  view source on GitHub ↗

Args: n: number of distinct colors name: name of matplotlib colormap 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: int, name: str = "hsv")

Source from the content-addressed store, hash-verified

36
37
38def get_cmap(n: int, name: str = "hsv") -> Colormap:
39 """
40 Args:
41 n: number of distinct colors
42 name: name of matplotlib colormap
43
44 Returns:
45 A function that maps each index in 0, 1, ..., n-1 to a distinct
46 RGB color; the keyword argument name must be a standard mpl colormap name.
47 """
48 return plt.cm.get_cmap(name, n)
49
50
51def make_labeled_image(

Callers 3

plot_gt_and_predictionsFunction · 0.90
plot_evaluation_resultsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected