MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / get_color_name

Function get_color_name

pyxrf/model/lineplot.py:26–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25
26def get_color_name():
27 # usually line plot will not go beyond 10
28 first_ten = [
29 "indigo",
30 "maroon",
31 "green",
32 "darkblue",
33 "darkgoldenrod",
34 "blue",
35 "darkcyan",
36 "sandybrown",
37 "black",
38 "darkolivegreen",
39 ]
40
41 # Avoid red color, as those color conflict with emission lines' color.
42 nonred_list = [
43 v
44 for v in matplotlib.colors.cnames.keys()
45 if "pink" not in v and "fire" not in v and "sage" not in v and "tomato" not in v and "red" not in v
46 ]
47 return first_ten + nonred_list + list(matplotlib.colors.cnames.keys())
48
49
50class PlotTypes(Enum):

Callers 2

plot_multi_exp_dataMethod · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected