-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC/API : color map change documentation #4238
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
DOC/API : color map change documentation #4238
Conversation
This is the first pass at documenting the decisions on how to change the default color map/cycles. The idea is to explain the reasoning in the documentation and to provide examples of all of the considered color maps. This will hopefully be a useful document both for posterity but for making the decision.
|
||
- it should be a sequential colormap, because diverging colormaps are | ||
really misleading unless you know where the "center" of the data is, | ||
and for a default colormap we generally won't. |
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.
imho for signed data, a diverging colormap centered at 0 is a good default choice. But I understand that behavior might be too magical for some.
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.
for me, it ain't just about the 0, but also the data around 0. I have in some of my plots for simplicity sake forced the colormap to go between -A and +A where A = np.max(np.abs(data))
, but then if the data say goes from -10 to +100, then it comes a bit more complicated so as to avoid the -10 looking quite faint...
This, I think, comes under the realm of the Normalize
class, perhaps we need a few more normalisation classes and think about which one to use as default...
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.
There is #3858 which adds a normalizer for dealing with that situation.
Picking anything about the diverging color map (if to use it, where to center it, if the upper/lower limits should be symmetric) requires knowing something about the meaning of the data which is a business mpl should not be in (as it is too widely used). This sort of domain-specific defaults should be the job of down-stream packages (ex scikit-image, pandas, seaborn, ...)
I've added one comment, but otherwise I think this is an excellent document! |
|
||
As discussed at length elsewhere [insert links], ``jet`` is an | ||
empirically bad color map and should not be the default color map. | ||
Due to the position that changing the appearance of plot is a back |
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.
maybe just say "Due to the position that changing the appearance of the plot breaks backward compatibility, ..."
👍 Awesome. |
Know what I would love to see? A side-by-side comparison of all the On Wed, Mar 18, 2015 at 11:03 AM, Michael Droettboom <
|
I would like to see this merged as soon as possible so that we can iterate on the text via PR in a way that does not make me the bottle neck and all of the PR issues live under the matplotlib organizations fork of mpl not mine. |
no problem. once travis passes, I'll merge it in. |
DOC/API : color map change documentation
This is the first pass at documenting the decisions on how to
change the default color map/cycles.
The idea is to explain the reasoning in the documentation and to provide
examples of all of the considered color maps. This will hopefully be a
useful document both for posterity but for making the decision.