Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
merged 2 commits into from
Mar 18, 2015

Conversation

tacaswell
Copy link
Member

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.

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.
@tacaswell tacaswell added this to the Color overhaul milestone Mar 18, 2015

- 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.
Copy link
Contributor

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.

Copy link
Member

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...

Copy link
Member Author

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, ...)

@jni
Copy link
Contributor

jni commented Mar 18, 2015

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
Copy link
Member

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, ..."

@mdboom
Copy link
Member

mdboom commented Mar 18, 2015

👍 Awesome.

@WeatherGod
Copy link
Member

Know what I would love to see? A side-by-side comparison of all the
colormap candidates so far.

On Wed, Mar 18, 2015 at 11:03 AM, Michael Droettboom <
notifications@github.com> wrote:

[image: 👍] Awesome.


Reply to this email directly or view it on GitHub
#4238 (comment)
.

@tacaswell
Copy link
Member Author

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.

@WeatherGod
Copy link
Member

no problem. once travis passes, I'll merge it in.

WeatherGod added a commit that referenced this pull request Mar 18, 2015
DOC/API : color map change documentation
@WeatherGod WeatherGod merged commit 489de41 into matplotlib:color_overhaul Mar 18, 2015
@tacaswell tacaswell deleted the color_changes branch March 18, 2015 17:06
@tacaswell tacaswell modified the milestones: Color overhaul, next major release (2.0) Oct 26, 2015
@QuLogic QuLogic modified the milestones: 2.0 (style change major release), v1.5.0 Oct 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.