-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from chrishavlin/add_cmyt_cmaps
Add cmyt cmaps too!
- Loading branch information
Showing
4 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import cmyt | ||
from matplotlib.colors import Colormap | ||
|
||
# we want to display colormap name then cmyt for sorting purposes | ||
cmyt_names = [ | ||
f"{cm}.cmyt" for cm in dir(cmyt) if isinstance(getattr(cmyt, cm), Colormap) | ||
] | ||
|
||
|
||
def validate_cmyt_name(cm): | ||
if cm.endswith(".cmyt"): | ||
return "cmyt." + cm.split(".")[0] | ||
return cm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters