-
Notifications
You must be signed in to change notification settings - Fork 31
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
New color map #483
New color map #483
Conversation
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.
This looks dope! A few small finicky changes I think would improve clarity, but this should be good to go without much tweaking. Thanks for adding this!
@fedarko thanks for reviewing this! I think I have addressed all of your comments. |
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.
Thanks @kwcantrell! This looks great -- I have one suggestion, but we could probably merge this in even without it.
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.
Sorry to nitpick but I have one more suggestion (I don't think it's needed but it will probably cause confusion if left unfixed). Aside from that, this looks good!
empress/support_files/js/colorer.js
Outdated
@@ -553,6 +565,8 @@ define(["chroma", "underscore", "util"], function (chroma, _, util) { | |||
"#808000", | |||
"#008080", | |||
]; | |||
Colorer.__GR_OR_PR = "GnOrPr"; |
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.
Colorer.__GR_OR_PR = "GnOrPr"; | |
Colorer.__GN_OR_PR = "GnOrPr"; |
Just to make this consistent with Colorer.__gnOrPr
-- if we use different abbreviations i suspect it'll cause problems down the line
empress/support_files/js/colorer.js
Outdated
@@ -244,7 +251,12 @@ define(["chroma", "underscore", "util"], function (chroma, _, util) { | |||
} else { | |||
domain = [min, max]; | |||
} | |||
var interpolator = chroma.scale(this.color).domain(domain); | |||
var interpolator; | |||
if (this.color === Colorer.__GR_OR_PR) { |
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.
if (this.color === Colorer.__GR_OR_PR) { | |
if (this.color === Colorer.__GN_OR_PR) { |
empress/support_files/js/colorer.js
Outdated
@@ -175,15 +175,22 @@ define(["chroma", "underscore", "util"], function (chroma, _, util) { | |||
); | |||
} | |||
|
|||
var interpolator; | |||
if (this.color === Colorer.__GR_OR_PR) { |
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.
if (this.color === Colorer.__GR_OR_PR) { | |
if (this.color === Colorer.__GN_OR_PR) { |
Nitpick away :) It should be fixed now. |
Perfect, thanks so much! |
This PR adds a new custom diverging color map (green to light orange to purple) that is great for coloring tree branches as a lot of the other diverging color maps are either hard to see the separation of values and/or the middle values are colored to light which makes the branches hard to see.
You can see that this color map does a good job separating the two extreme values (i.e. endpoints) from the middle values while still making everything visible on screen.