Add shortcut logic for discrete and labelled `ColorManager` setup
Essentially, the following scenario has sufficient information to specify both labels and colormap values:
cmap:
foo: red
bar: blue
baz: green
limits: [0, 2]
By assuming that the given labels and colors map to integers 0, 1, 2
, this avoids having to specify cmap.from_values
and labels
at the same time.
The above would internally be translated to:
cmap:
from_values:
0: red
1: blue
2: green
labels:
0: foo
1: bar
2: baz
Edited by Yunus Sevinchan