-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
labels added, custom cmaps added also if they are not in styles #1057
Conversation
test/util/test_cmaps.py
Outdated
@@ -403,6 +403,7 @@ def test_create_colormap_from_config_color_entry_object(self): | |||
"name": "my_cmap", | |||
"type": "continuous", | |||
"colors": [[0.0, "red"], [12.0, "#0000FF"], [24.0, [0, 1, 0, 0.3]]], | |||
"labels": ["low", "medium", "high"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not correct - at least not what was specified:
type ColorEntryTuple = [number, Color] | [number, Color, label];
See also docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xcube/util/cmaps.py
Outdated
name=cmap_config["Identifier"], | ||
type=cmap_config["Type"], | ||
colors=colors, | ||
labels=labels, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Closes #1046 second part; see discussion comment and comments below
CHANGES.md
will not be updated, as it is already updated in #1055.Checklist:
Add docstrings and API docs for any new/modified user-facing classes and functionsdocs/source/*
Changes documented inCHANGES.md