Discussion:
[Matplotlib-users] Fwd: [matplotlib-devel] RFC: candidates for a new default colormap
Eric Firing
2015-06-04 20:42:46 UTC
Permalink
I am forwarding a message from Nathaniel Smith which is the start of a
long thread on matplotlib-devel
http://news.gmane.org/gmane.comp.python.matplotlib.devel
related to changes that are in the works for matplotlib, and that are
therefore of interest to matplotlib users. Specifically, we will be
updating the default color cycle for line plots, and the default
colormap for image-type plots, including contourf and pcolormesh. The
most important part of Nathaniel's message is the link:

https://bids.github.io/colormap/

which has been updated since his first message below.

Note that we are looking for a new *default* colormap--the one that will
be used if you have not specified an alternative in your matplotlibrc
file, your function keyword arguments, or anywhere else. It does not in
any way limit your ability to specify a colormap that you prefer for a
particular application, or as your own default. Rather, it should be a
good all-around choice, that works reasonably well in a variety of
applications, and that most people will find *comfortable* as well as
functional. It will become part of matplotlib's "look"; it should
attract rather than repel prospective and new users. We have some
consensus about some of the other criteria, and these are coded into the
tool that Nathaniel and Stéfan have developed for generating colormaps.
So far, 4 alternatives generated with this tool have been proposed at
the link above; more might be added.

Eric

-------- Forwarded Message --------
Subject: [matplotlib-devel] RFC: candidates for a new default colormap
Date: Tue, 2 Jun 2015 18:46:21 -0700
From: Nathaniel Smith <***@pobox.com>
To: matplotlib-***@lists.sourceforge.net
<matplotlib-***@lists.sourceforge.net>

Hi all,

As was hinted at in a previous thread, Stéfan van der Walt and I have
been using some Fancy Color Technology to attempt to design a new
colormap intended to become matplotlib's new default. (Down with jet!)

Unfortunately, while our Fancy Color Technology includes a
computational model of perceptual distance, it does not include a
computational model of aesthetics. So this is where you come in.

We've put up three reasonable candidates at:
https://bids.github.io/colormap/
(along with some well-known colormaps for comparison), and we'd like
your feedback.

They are all optimal on all of the objective criteria we know how to
measure. What we need judgements on is which one you like best, both
aesthetically and as a way of visualizing data. (There are some sample
plots to look at there, plus you can download them and play with them
on your own data if you want.)

We especially value input from anyone with anomalous color vision.
There are some simulations there, but computational models are
inherently limited here. (It's difficult to ask someone with
colorblindness "does this look to you, the same way this other picture
looks to me?")

-n
--
Nathaniel J. Smith -- http://vorpus.org

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel



------------------------------------------------------------------------------
Joy merwin monteiro
2015-06-05 02:03:30 UTC
Permalink
If we have to reply on this thread, I would choose Option C.
I don't like A,B because of the strong black at the edges, which
sometimes saturate plots whose values vary a lot. I prefer C over
D because of a personal preference towards darker colours.

Joy
Post by Eric Firing
I am forwarding a message from Nathaniel Smith which is the start of a
long thread on matplotlib-devel
http://news.gmane.org/gmane.comp.python.matplotlib.devel
related to changes that are in the works for matplotlib, and that are
therefore of interest to matplotlib users. Specifically, we will be
updating the default color cycle for line plots, and the default
colormap for image-type plots, including contourf and pcolormesh. The
https://bids.github.io/colormap/
which has been updated since his first message below.
Note that we are looking for a new *default* colormap--the one that will
be used if you have not specified an alternative in your matplotlibrc
file, your function keyword arguments, or anywhere else. It does not in
any way limit your ability to specify a colormap that you prefer for a
particular application, or as your own default. Rather, it should be a
good all-around choice, that works reasonably well in a variety of
applications, and that most people will find *comfortable* as well as
functional. It will become part of matplotlib's "look"; it should
attract rather than repel prospective and new users. We have some
consensus about some of the other criteria, and these are coded into the
tool that Nathaniel and Stéfan have developed for generating colormaps.
So far, 4 alternatives generated with this tool have been proposed at
the link above; more might be added.
Eric
-------- Forwarded Message --------
Subject: [matplotlib-devel] RFC: candidates for a new default colormap
Date: Tue, 2 Jun 2015 18:46:21 -0700
Hi all,
As was hinted at in a previous thread, Stéfan van der Walt and I have
been using some Fancy Color Technology to attempt to design a new
colormap intended to become matplotlib's new default. (Down with jet!)
Unfortunately, while our Fancy Color Technology includes a
computational model of perceptual distance, it does not include a
computational model of aesthetics. So this is where you come in.
https://bids.github.io/colormap/
(along with some well-known colormaps for comparison), and we'd like
your feedback.
They are all optimal on all of the objective criteria we know how to
measure. What we need judgements on is which one you like best, both
aesthetically and as a way of visualizing data. (There are some sample
plots to look at there, plus you can download them and play with them
on your own data if you want.)
We especially value input from anyone with anomalous color vision.
There are some simulations there, but computational models are
inherently limited here. (It's difficult to ask someone with
colorblindness "does this look to you, the same way this other picture
looks to me?")
-n
--
Nathaniel J. Smith -- http://vorpus.org
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
The best ruler, when he finishes his
tasks and completes his affairs,
the people say
“It all happened naturally”

- Te Tao Ch'ing
Neal Becker
2015-06-05 10:51:47 UTC
Permalink
I vote for D, although I like matlab's new default even better


------------------------------------------------------------------------------
Philipp A.
2015-06-05 15:21:35 UTC
Permalink
I vote for A and B. Only B if i get just one vote.

C is too washed out and i like the warm colors more than the cold ones in D.

It’s funny that this comes up while I’m handling colormaps in my own work
at the moment.
Post by Neal Becker
I vote for D, although I like matlab's new default even better
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Benjamin Root
2015-06-05 15:36:14 UTC
Permalink
It is funny that you mention that you prefer the warmer colors over the
cooler colors. There has been some back-n-forth about which is better. I
personally have found myself adverse to using just cool or just warm
colors, preferring a mix of cool and warm colors. Perhaps it is my
background in meteorology and viewing temperature maps?

Another place where a mix of cool and warm colors are useful is for
severity indications such as radar maps. It is no accident that radar maps
are colored greens and blues for weak precipitation, then yellow for
heavier, and then reds for heaviest (possibly severe) precipitation -- it
came from the old FAA color guides. While we all know that that colormap is
fundamentally flawed, there was a rationale behind it.

Hopefully I will have some time today to play around with the D option. I
want to see if I can shift the curve a bit to include more yellows and
orange so that it can have a mix of cool and warm colors.

Ben Root
Post by Philipp A.
I vote for A and B. Only B if i get just one vote.
C is too washed out and i like the warm colors more than the cold ones in D.
It’s funny that this comes up while I’m handling colormaps in my own work
at the moment.
Post by Neal Becker
I vote for D, although I like matlab's new default even better
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Joe Kington
2015-06-05 16:15:13 UTC
Permalink
Post by Benjamin Root
Hopefully I will have some time today to play around with the D option. I
want to see if I can shift the curve a bit to include more yellows and
orange so that it can have a mix of cool and warm colors.
I was thinking the same thing earlier. Here's my attempt:

​

Note to Ben, et al, you got an e-mail from me earlier that bounced to the
list (too big). This is a less muted version of that colormap.
Joe Kington
2015-06-05 16:30:37 UTC
Permalink
Post by Benjamin Root
Hopefully I will have some time today to play around with the D option. I
Post by Benjamin Root
want to see if I can shift the curve a bit to include more yellows and
orange so that it can have a mix of cool and warm colors.
Not to jump back on topics too much, but I forgot to attach the colormap to
my earlier e-mail. Here it is.
Eric Firing
2015-06-05 18:19:58 UTC
Permalink
Post by Benjamin Root
Hopefully I will have some time today to play around with the D
option. I want to see if I can shift the curve a bit to include more
yellows and orange so that it can have a mix of cool and warm colors.
Joe,

Thank you--that's an interesting option. It reminds me of the middle
half of cubehelix in the Miscellaneous set:

http://matplotlib.org/examples/color/colormaps_reference.html

Cubehelix is also generated by an algorithm.

Your blu_grn_pink2 looks worth adding to the mpl collection.

Eric


------------------------------------------------------------------------------
Jody Klymak
2015-06-05 16:17:09 UTC
Permalink
Hi,

This is a great initiative, I love colormaps and am always disatisfied.

However, I am concerned about these proposed defaults. As Ben says, there are two types of data sets: “intensity” or “density” data, and data sets with a natural zero (i.e. positive or negative anomaly or velocity). I’d be fine with any of the proposed colormaps for “intensity” data sets, but I would *never* use them for anomaly data sets; I couldn’t tell where the middle (zero) of any of those colormaps are intuitively.

Jet and parula, for all their sins, are decent compromises for the naive user (or the user in a rush) because they do a good job of representing both types of data. Even in black and white jet does something reasonable, which is go to dark at extreme values and white-ish in the middle. Jet also has a nice central green hue between blue and yellow that signals zero (or at least it does to me after years of looking at it). I don’t see that jet really loses that under colorblindness; in fact I almost prefer the “Moderate Deuter” version of jet to the actual jet.

Anyways, I guess I am advocating trying to find a colormap with a very obvious central hue to represent zero. Anomaly data sets are *very* common, so having a default colormap that doesn’t do something reasonable with them may be a turn off to new users.

Cheers, Jody
It is funny that you mention that you prefer the warmer colors over the cooler colors. There has been some back-n-forth about which is better. I personally have found myself adverse to using just cool or just warm colors, preferring a mix of cool and warm colors. Perhaps it is my background in meteorology and viewing temperature maps?
Another place where a mix of cool and warm colors are useful is for severity indications such as radar maps. It is no accident that radar maps are colored greens and blues for weak precipitation, then yellow for heavier, and then reds for heaviest (possibly severe) precipitation -- it came from the old FAA color guides. While we all know that that colormap is fundamentally flawed, there was a rationale behind it.
Hopefully I will have some time today to play around with the D option. I want to see if I can shift the curve a bit to include more yellows and orange so that it can have a mix of cool and warm colors.
Ben Root
I vote for A and B. Only B if i get just one vote.
C is too washed out and i like the warm colors more than the cold ones in D.
It’s funny that this comes up while I’m handling colormaps in my own work at the moment.
I vote for D, although I like matlab's new default even better
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Jody Klymak
http://web.uvic.ca/~jklymak/
Paul Hobson
2015-06-05 16:26:37 UTC
Permalink
Post by Jody Klymak
Anyways, I guess I am advocating trying to find a colormap with a very
obvious central hue to represent zero. Anomaly data sets are *very*
common, so having a default colormap that doesn’t do something reasonable
with them may be a turn off to new users.
Personally, I disagree. I think that sequential colormaps make better
defaults b/c then the software isn't making an assumptions about the
central tendency of your data.

You raise a good point though. Perhaps a compromise is to make "sequential"
and "diverging" valid arguments to any function that takes "cmap" and falls
back to the default colormap and e.g. "coolwarm", respectively.
Thomas Caswell
2015-06-05 16:27:11 UTC
Permalink
Jody,

This has come up before and the consensus seemed to be that for the anomaly
data sets knowing where the zero is is very important and the default color
limits will probably get that wrong. So long as the user has to set the
limits, they can also select one of the diverging color maps.

I also advocate for users/domains which typically plot anomaly/diverging
data sets to write helper functions like

def im_diverging(ax, data, cmap='RbBu', *args, **kwargs):
limits = some_limit_function(data)
return ax.imshow(data, cmap=cmap, vmin=limits[0], vmax=limits[1],
*args, **kwargs)

Tom
Post by Jody Klymak
Hi,
This is a great initiative, I love colormaps and am always disatisfied.
However, I am concerned about these proposed defaults. As Ben says, there
are two types of data sets: “intensity” or “density” data, and data sets
with a natural zero (i.e. positive or negative anomaly or velocity). I’d
be fine with any of the proposed colormaps for “intensity” data sets, but I
would *never* use them for anomaly data sets; I couldn’t tell where the
middle (zero) of any of those colormaps are intuitively.
Jet and parula, for all their sins, are decent compromises for the naive
user (or the user in a rush) because they do a good job of representing
both types of data. Even in black and white jet does something reasonable,
which is go to dark at extreme values and white-ish in the middle. Jet
also has a nice central green hue between blue and yellow that signals zero
(or at least it does to me after years of looking at it). I don’t see that
jet really loses that under colorblindness; in fact I almost prefer the
“Moderate Deuter” version of jet to the actual jet.
Anyways, I guess I am advocating trying to find a colormap with a very
obvious central hue to represent zero. Anomaly data sets are *very*
common, so having a default colormap that doesn’t do something reasonable
with them may be a turn off to new users.
Cheers, Jody
It is funny that you mention that you prefer the warmer colors over the
cooler colors. There has been some back-n-forth about which is better. I
personally have found myself adverse to using just cool or just warm
colors, preferring a mix of cool and warm colors. Perhaps it is my
background in meteorology and viewing temperature maps?
Another place where a mix of cool and warm colors are useful is for
severity indications such as radar maps. It is no accident that radar maps
are colored greens and blues for weak precipitation, then yellow for
heavier, and then reds for heaviest (possibly severe) precipitation -- it
came from the old FAA color guides. While we all know that that colormap is
fundamentally flawed, there was a rationale behind it.
Hopefully I will have some time today to play around with the D option. I
want to see if I can shift the curve a bit to include more yellows and
orange so that it can have a mix of cool and warm colors.
Ben Root
Post by Philipp A.
I vote for A and B. Only B if i get just one vote.
C is too washed out and i like the warm colors more than the cold ones in D.
It’s funny that this comes up while I’m handling colormaps in my own work
at the moment.
Post by Neal Becker
I vote for D, although I like matlab's new default even better
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Jody Klymak
http://web.uvic.ca/~jklymak/
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jody Klymak
2015-06-05 17:59:20 UTC
Permalink
Jody,
This has come up before and the consensus seemed to be that for the anomaly data sets knowing where the zero is is very important and the default color limits will probably get that wrong. So long as the user has to set the limits, they can also select one of the diverging color maps.
OK, fair enough - if the consensus is that people who want diverging colormaps need to know what they are doing, and the default is only for sequential data, then that argument has merit. I do not look forward to seeing the first student talks that try to contour velocity data using one of these colormaps, but maybe the results will be so ghastly the naive user will realize they need to do something more appropriate.

However, if sequential is what you have decided, then it is useful to say how the underlying data is distributed: For uniform distributions like those used in the plotted examples, I *prefer* C and D. However, for data like that in the movies, which look to be more Gaussian, I would actually prefer B, or a version of D that went to black and white to better represent the extreme values. Put another way, I’d use A and B, but most of the time I’d set my data limits so that they didn’t saturate as much as they do in the plotted examples. Hopefully that makes sense.

Cheers, Jody
I also advocate for users/domains which typically plot anomaly/diverging data sets to write helper functions like
limits = some_limit_function(data)
return ax.imshow(data, cmap=cmap, vmin=limits[0], vmax=limits[1], *args, **kwargs)
Tom
Hi,
This is a great initiative, I love colormaps and am always disatisfied.
However, I am concerned about these proposed defaults. As Ben says, there are two types of data sets: “intensity” or “density” data, and data sets with a natural zero (i.e. positive or negative anomaly or velocity). I’d be fine with any of the proposed colormaps for “intensity” data sets, but I would *never* use them for anomaly data sets; I couldn’t tell where the middle (zero) of any of those colormaps are intuitively.
Jet and parula, for all their sins, are decent compromises for the naive user (or the user in a rush) because they do a good job of representing both types of data. Even in black and white jet does something reasonable, which is go to dark at extreme values and white-ish in the middle. Jet also has a nice central green hue between blue and yellow that signals zero (or at least it does to me after years of looking at it). I don’t see that jet really loses that under colorblindness; in fact I almost prefer the “Moderate Deuter” version of jet to the actual jet.
Anyways, I guess I am advocating trying to find a colormap with a very obvious central hue to represent zero. Anomaly data sets are *very* common, so having a default colormap that doesn’t do something reasonable with them may be a turn off to new users.
Cheers, Jody
It is funny that you mention that you prefer the warmer colors over the cooler colors. There has been some back-n-forth about which is better. I personally have found myself adverse to using just cool or just warm colors, preferring a mix of cool and warm colors. Perhaps it is my background in meteorology and viewing temperature maps?
Another place where a mix of cool and warm colors are useful is for severity indications such as radar maps. It is no accident that radar maps are colored greens and blues for weak precipitation, then yellow for heavier, and then reds for heaviest (possibly severe) precipitation -- it came from the old FAA color guides. While we all know that that colormap is fundamentally flawed, there was a rationale behind it.
Hopefully I will have some time today to play around with the D option. I want to see if I can shift the curve a bit to include more yellows and orange so that it can have a mix of cool and warm colors.
Ben Root
I vote for A and B. Only B if i get just one vote.
C is too washed out and i like the warm colors more than the cold ones in D.
It’s funny that this comes up while I’m handling colormaps in my own work at the moment.
I vote for D, although I like matlab's new default even better
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
--
Jody Klymak
http://web.uvic.ca/~jklymak/ <http://web.uvic.ca/~jklymak/>
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
--
Jody Klymak
http://web.uvic.ca/~jklymak/
Sourish Basu
2015-06-05 18:17:47 UTC
Permalink
------------------------------------------------------------------------------
Jody Klymak
2015-06-05 18:22:25 UTC
Permalink
Hi,
Post by Jody Klymak
Anyways, I guess I am advocating trying to find a colormap with a very obvious central hue to represent zero. Anomaly data sets are *very* common, so having a default colormap that doesn’t do something reasonable with them may be a turn off to new users.
I agree that jet does a bad job with anomaly data, but I disagree that having a diverging colormap as default (or even a "diverging" argument to anything that takes a cmap value) would solve that. Very often the "zero" of an anomaly is not at the center of the extrema, and requires creating a custom diverging colormap anyway (see attached example).
Well, I *strongly* disagree with that attached example! It makes it look like -0.5 is equivalent to +1.5! Unless there is a really strong reason to do that, I think that is poor practice as it makes your negative anomalies look far stronger than your positive, and that is not the case in the underlying numbers.

Cheers, Jody
OT, I recently found a nice alternative to jet here:https://mycarta.wordpress.com/2014/11/13/new-rainbow-colormap-sawthoot-shaped-lightness-profile/ <https://mycarta.wordpress.com/2014/11/13/new-rainbow-colormap-sawthoot-shaped-lightness-profile/>
It takes care of my biggest crib with jet, which is that there is not enough perceptual variation in the middle of the range.
Cheers,
Sourish Basu
<ff_adjustment_winter.png>------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Jody Klymak
http://web.uvic.ca/~jklymak/
Sourish Basu
2015-06-05 18:39:02 UTC
Permalink
------------------------------------------------------------------------------
Jody Klymak
2015-06-05 18:44:33 UTC
Permalink
This problem is reasonably common for me, BTW. I can have a carbon monoxide field with an average/background of 60 ppb, but variations from 30 to 550 ppb. So I need a color scale which (a) is white at 60, and (b) shows small variations below 60 and large variations above 60 with equal "clarity”.
If you need to see small changes at low values and they are equally important to large changes at high values, then taking the logarithm is often useful (or scaling your colorbar logarithmically).

Cheers, Jody


--
Jody Klymak
http://web.uvic.ca/~jklymak/
Sourish Basu
2015-06-05 21:35:00 UTC
Permalink
------------------------------------------------------------------------------
Eric Firing
2015-06-05 19:20:00 UTC
Permalink
Very often the "zero" of an anomaly is not at the center of the extrema,
and requires creating a custom diverging colormap anyway (see attached
example).
Reminder: in matplotlib, color mapping is done with the combination of a
colormap and a norm. This allows one to design a norm to handle the
mapping, including any nonlinearity or difference between the handling
of positive and negative values. This is more general than customizing
a colormap; once you have a norm to suit your purpose, you can use it
with any colormap.

Maybe this is actually what you are already doing, but I wanted to point
it out here in case some readers are not familiar with this
colormap+norm strategy.

Eric

------------------------------------------------------------------------------
Benjamin Root
2015-06-05 20:45:54 UTC
Permalink
Furthermore, I think there is some work being done to add functionality to
the Norm to allow specifying a middle value along with a vmin and a vmax.

Ben Root
Post by Eric Firing
Very often the "zero" of an anomaly is not at the center of the extrema,
and requires creating a custom diverging colormap anyway (see attached
example).
Reminder: in matplotlib, color mapping is done with the combination of a
colormap and a norm. This allows one to design a norm to handle the
mapping, including any nonlinearity or difference between the handling
of positive and negative values. This is more general than customizing
a colormap; once you have a norm to suit your purpose, you can use it
with any colormap.
Maybe this is actually what you are already doing, but I wanted to point
it out here in case some readers are not familiar with this
colormap+norm strategy.
Eric
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jody Klymak
2015-06-05 21:13:39 UTC
Permalink
Hi Eric,
Post by Eric Firing
Reminder: in matplotlib, color mapping is done with the combination of a
colormap and a norm. This allows one to design a norm to handle the
mapping, including any nonlinearity or difference between the handling
of positive and negative values. This is more general than customizing
a colormap; once you have a norm to suit your purpose, you can use it
with any colormap.
Though I was hazily aware of norms, I’d not really seen that before. I particularly like the example at http://matplotlib.org/examples/pylab_examples/pcolor_log.html

This seems useful enough that a section under “User Guide:Advanced Guide” would be really helpful. An example that displays all the canned norms, and maybe how to make a custom norm. I only found the pcolor_log example by searching for colors.lognorm, which I only knew about from your comment above. There a few hits on stackexchange, but those are for specific instances and hard to find by random.

I could help do this, but it’d take a while to actually learn how to use the norms.

Thanks, Jody
Post by Eric Firing
Maybe this is actually what you are already doing, but I wanted to point
it out here in case some readers are not familiar with this
colormap+norm strategy.
Eric
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Jody Klymak
http://web.uvic.ca/~jklymak/






------------------------------------------------------------------------------
Eric Firing
2015-06-05 21:26:10 UTC
Permalink
Post by Jody Klymak
Though I was hazily aware of norms, I’d not really seen that before.
I particularly like the example
athttp://matplotlib.org/examples/pylab_examples/pcolor_log.html
This seems useful enough that a section under “User Guide:Advanced
Guide” would be really helpful. An example that displays all the
canned norms, and maybe how to make a custom norm. I only found the
pcolor_log example by searching for colors.lognorm, which I only knew
about from your comment above. There a few hits on stackexchange,
but those are for specific instances and hard to find by random.
I could help do this, but it’d take a while to actually learn how to use the norms.
Jody,

Contributions to the documentation would be very welcome.

Eric

------------------------------------------------------------------------------
Jody Klymak
2015-06-06 03:05:40 UTC
Permalink
Hi Eric,

OK, how about an example based on the following notebook:

http://nbviewer.ipython.org/url/web.uvic.ca/~jklymak/matplotlib/MatplotlibNormExamples.ipynb

It includes Joe’s example of a non-linear midpoint.

Cheers, Jody
Post by Eric Firing
Post by Jody Klymak
Though I was hazily aware of norms, I’d not really seen that before.
I particularly like the example
athttp://matplotlib.org/examples/pylab_examples/pcolor_log.html
This seems useful enough that a section under “User Guide:Advanced
Guide” would be really helpful. An example that displays all the
canned norms, and maybe how to make a custom norm. I only found the
pcolor_log example by searching for colors.lognorm, which I only knew
about from your comment above. There a few hits on stackexchange,
but those are for specific instances and hard to find by random.
I could help do this, but it’d take a while to actually learn how to use the norms.
Jody,
Contributions to the documentation would be very welcome.
Eric
------------------------------------------------------------------------------
Sourish Basu
2015-06-05 21:43:38 UTC
Permalink
------------------------------------------------------------------------------
Joe Kington
2015-06-05 21:57:00 UTC
Permalink
Not to plug one of my own answers to much, but here's a basic example.
http://stackoverflow.com/questions/20144529/shifted-colorbar-matplotlib

I've been meeting to submit a PR with a more full featured version for a
few years now, but haven't.
Post by Eric Firing
Reminder: in matplotlib, color mapping is done with the combination of a
colormap and a norm. This allows one to design a norm to handle the
mapping, including any nonlinearity or difference between the handling
of positive and negative values. This is more general than customizing
a colormap; once you have a norm to suit your purpose, you can use it
with any colormap.
Maybe this is actually what you are already doing, but I wanted to point
it out here in case some readers are not familiar with this
colormap+norm strategy.
Actually, I didn't use norms because I never quite figured out how to use
them or how to make my own. If there's a way to create a norm with a custom
mid-point, I'd love to know/use that.
-Sourish
Eric
------------------------------------------------------------------------------
_______________________________________________
--
*Q:* What if you strapped C4 to a boomerang? Could this be an effective
weapon, or would it be as stupid as it sounds?
*A:* Aerodynamics aside, I’m curious what tactical advantage you’re
expecting to gain by having the high explosive fly back at you if it misses
the target.
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Paul Hobson
2015-06-05 23:46:39 UTC
Permalink
Dang it, Joe,

How do you do everything l try to do like 1000x better?

Guess I'll be closing this:
https://github.com/matplotlib/matplotlib/pull/3858
-paul
Post by Joe Kington
Not to plug one of my own answers to much, but here's a basic example.
http://stackoverflow.com/questions/20144529/shifted-colorbar-matplotlib
I've been meeting to submit a PR with a more full featured version for a
few years now, but haven't.
Post by Eric Firing
Reminder: in matplotlib, color mapping is done with the combination of a
colormap and a norm. This allows one to design a norm to handle the
mapping, including any nonlinearity or difference between the handling
of positive and negative values. This is more general than customizing
a colormap; once you have a norm to suit your purpose, you can use it
with any colormap.
Maybe this is actually what you are already doing, but I wanted to point
it out here in case some readers are not familiar with this
colormap+norm strategy.
Actually, I didn't use norms because I never quite figured out how to use
them or how to make my own. If there's a way to create a norm with a custom
mid-point, I'd love to know/use that.
-Sourish
Eric
------------------------------------------------------------------------------
_______________________________________________
--
*Q:* What if you strapped C4 to a boomerang? Could this be an effective
weapon, or would it be as stupid as it sounds?
*A:* Aerodynamics aside, I’m curious what tactical advantage you’re
expecting to gain by having the high explosive fly back at you if it misses
the target.
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Joe Kington
2015-06-07 00:16:18 UTC
Permalink
Post by Paul Hobson
https://github.com/matplotlib/matplotlib/pull/3858
-paul
Nice PR! That does a heck of a lot better job than my (way too simplistic)
example.
Post by Paul Hobson
Hi Eric,
http://nbviewer.ipython.org/url/web.uvic.ca/~jklymak/matplotlib/MatplotlibNormExamples.ipynb

Those are extremely nice examples, by the way!
Sourish Basu
2015-06-08 22:39:09 UTC
Permalink
------------------------------------------------------------------------------
Jan Heczko
2015-06-05 11:20:42 UTC
Permalink
I'd choose D.
A and B are too dark. Also, A-C seem to hide some detail in the simulation
of color blindness.
Post by Eric Firing
I am forwarding a message from Nathaniel Smith which is the start of a
long thread on matplotlib-devel
http://news.gmane.org/gmane.comp.python.matplotlib.devel
related to changes that are in the works for matplotlib, and that are
therefore of interest to matplotlib users. Specifically, we will be
updating the default color cycle for line plots, and the default
colormap for image-type plots, including contourf and pcolormesh. The
https://bids.github.io/colormap/
which has been updated since his first message below.
Note that we are looking for a new *default* colormap--the one that will
be used if you have not specified an alternative in your matplotlibrc
file, your function keyword arguments, or anywhere else. It does not in
any way limit your ability to specify a colormap that you prefer for a
particular application, or as your own default. Rather, it should be a
good all-around choice, that works reasonably well in a variety of
applications, and that most people will find *comfortable* as well as
functional. It will become part of matplotlib's "look"; it should
attract rather than repel prospective and new users. We have some
consensus about some of the other criteria, and these are coded into the
tool that Nathaniel and Stéfan have developed for generating colormaps.
So far, 4 alternatives generated with this tool have been proposed at
the link above; more might be added.
Eric
-------- Forwarded Message --------
Subject: [matplotlib-devel] RFC: candidates for a new default colormap
Date: Tue, 2 Jun 2015 18:46:21 -0700
Hi all,
As was hinted at in a previous thread, Stéfan van der Walt and I have
been using some Fancy Color Technology to attempt to design a new
colormap intended to become matplotlib's new default. (Down with jet!)
Unfortunately, while our Fancy Color Technology includes a
computational model of perceptual distance, it does not include a
computational model of aesthetics. So this is where you come in.
https://bids.github.io/colormap/
(along with some well-known colormaps for comparison), and we'd like
your feedback.
They are all optimal on all of the objective criteria we know how to
measure. What we need judgements on is which one you like best, both
aesthetically and as a way of visualizing data. (There are some sample
plots to look at there, plus you can download them and play with them
on your own data if you want.)
We especially value input from anyone with anomalous color vision.
There are some simulations there, but computational models are
inherently limited here. (It's difficult to ask someone with
colorblindness "does this look to you, the same way this other picture
looks to me?")
-n
--
Nathaniel J. Smith -- http://vorpus.org
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Thomas Sprinzing
2015-06-05 12:24:59 UTC
Permalink
I opt for B,
and adding the matlab-default as secondary.


cheers

THomas


Thomas Sprinzing
Dipl.-Ing. (FH)

Labor Tiefdruck
Studiengang Druck- und Medientechnologie

Hochschule der Medien
University of Applied Sciences
Nobelstr. 10
70569 Stuttgart

Telefon: +49 711 8923 2196

www.hdm-stuttgart.de/dt
Post by Jan Heczko
I'd choose D.
A and B are too dark. Also, A-C seem to hide some detail in the simulation of color blindness.
I am forwarding a message from Nathaniel Smith which is the start of a
long thread on matplotlib-devel
http://news.gmane.org/gmane.comp.python.matplotlib.devel
related to changes that are in the works for matplotlib, and that are
therefore of interest to matplotlib users. Specifically, we will be
updating the default color cycle for line plots, and the default
colormap for image-type plots, including contourf and pcolormesh. The
https://bids.github.io/colormap/
which has been updated since his first message below.
Note that we are looking for a new *default* colormap--the one that will
be used if you have not specified an alternative in your matplotlibrc
file, your function keyword arguments, or anywhere else. It does not in
any way limit your ability to specify a colormap that you prefer for a
particular application, or as your own default. Rather, it should be a
good all-around choice, that works reasonably well in a variety of
applications, and that most people will find *comfortable* as well as
functional. It will become part of matplotlib's "look"; it should
attract rather than repel prospective and new users. We have some
consensus about some of the other criteria, and these are coded into the
tool that Nathaniel and Stéfan have developed for generating colormaps.
So far, 4 alternatives generated with this tool have been proposed at
the link above; more might be added.
Eric
-------- Forwarded Message --------
Subject: [matplotlib-devel] RFC: candidates for a new default colormap
Date: Tue, 2 Jun 2015 18:46:21 -0700
Hi all,
As was hinted at in a previous thread, Stéfan van der Walt and I have
been using some Fancy Color Technology to attempt to design a new
colormap intended to become matplotlib's new default. (Down with jet!)
Unfortunately, while our Fancy Color Technology includes a
computational model of perceptual distance, it does not include a
computational model of aesthetics. So this is where you come in.
https://bids.github.io/colormap/
(along with some well-known colormaps for comparison), and we'd like
your feedback.
They are all optimal on all of the objective criteria we know how to
measure. What we need judgements on is which one you like best, both
aesthetically and as a way of visualizing data. (There are some sample
plots to look at there, plus you can download them and play with them
on your own data if you want.)
We especially value input from anyone with anomalous color vision.
There are some simulations there, but computational models are
inherently limited here. (It's difficult to ask someone with
colorblindness "does this look to you, the same way this other picture
looks to me?")
-n
--
Nathaniel J. Smith -- http://vorpus.org
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Loading...