-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
rainforest, a new perceptually uniform sequential colormap #14668
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
Comments
You can check previous PRs that added a colormap, like e.g. #6254. Here, we'd probably like to see some arguments for why this would be a useful addition to matplotlib. In particular, there is a pretty similar colormap |
I have heard from several other people that it looks quite similar to The output from The main reason why I made the colormap was simply because the two golden standards (viridis and cividis) both did not have enough variation in color to be used in sequences where small differences should be noticeable. |
I would suggest publishing the colormap as your own standalone package; see discussion at #6254 (comment) and #6033 (comment). |
This looks similar to mathwork's parula, doesn't it?
https://www.mathworks.com/help/matlab/ref/parula.html
…On Mon, Jul 1, 2019 at 9:13 AM Antony Lee ***@***.***> wrote:
I would suggest publishing the colormap as your own standalone package;
see discussion at #6254 (comment)
<#6254 (comment)>
and #6033 (comment)
<#6033 (comment)>
.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#14668?email_source=notifications&email_token=AACHF6BTYOU5N5XFKCZ3B7DP5H7JBA5CNFSM4H4Q3I5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6CRSA#issuecomment-507259080>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACHF6DNL2AEQPPGOUOH53LP5H7JBANCNFSM4H4Q3I5A>
.
|
By the way, there is a reason why the viridis and friends colormaps don't
fully use the brightness scale. This makes it possible for annotations in
black or white to appear on top of a colormapped image.
…On Mon, Jul 1, 2019 at 10:20 AM Benjamin Root ***@***.***> wrote:
This looks similar to mathwork's parula, doesn't it?
https://www.mathworks.com/help/matlab/ref/parula.html
On Mon, Jul 1, 2019 at 9:13 AM Antony Lee ***@***.***>
wrote:
> I would suggest publishing the colormap as your own standalone package;
> see discussion at #6254 (comment)
> <#6254 (comment)>
> and #6033 (comment)
> <#6033 (comment)>
> .
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#14668?email_source=notifications&email_token=AACHF6BTYOU5N5XFKCZ3B7DP5H7JBA5CNFSM4H4Q3I5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6CRSA#issuecomment-507259080>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AACHF6DNL2AEQPPGOUOH53LP5H7JBANCNFSM4H4Q3I5A>
> .
>
|
Would it make sense to grab a new top-level namespace package ( At a minimum we should make a new section of the third-party tools page specifically for additional color maps. @1313e I think the biggest advantage of doing a stand-alone package is that it is probably less than a day of work to get it packaged and on pypi so best-case you could have this in users hands tomorrow. If it goes into core matplotlib the best case is September / October. |
I agree, but making a stand-alone package for simply a single colormap sounds a bit stupid to me.
Uhm, yeah, it does look like it a bit. |
Hmm, never thought about it that way. |
Here's the problem. MathWorks has explicitly told us that parula is their
own copyrighted work, and that we are not allowed to use it in our open
source package. We don't agree that they can copyright a colormap, but we
also don't have the resources to defend against a legal challenge.
…On Mon, Jul 1, 2019 at 11:07 AM Ellert van der Velden < ***@***.***> wrote:
@1313e <https://github.com/1313e> I think the biggest advantage of doing
a stand-alone package is that it is probably less than a day of work to get
it packaged and on pypi so best-case you could have this in users hands
tomorrow. If it goes into core matplotlib the best case is September /
October.
I agree, but making a stand-alone package for simply a single colormap
sounds a bit stupid to me.
Plus, putting it into Matplotlib vastly increases the number of people
that can use it (as it is much more popular).
I personally would not really mind having to wait a few months before it
is published into core Matplotlib.
The colormap is theoretically speaking already available by installing my
PRISM package or simply copying and reading its data file.
This looks similar to mathwork's parula, doesn't it?
https://www.mathworks.com/help/matlab/ref/parula.html
Uhm, yeah, it does look like it a bit.
I have never used MATLAB before, so never seen that one before.
As the base for the rainforest colormap was jet, which used to be one of
the most used colormaps, it does not surprise me that there are several
colormaps out there that look somewhat similar.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14668?email_source=notifications&email_token=AACHF6FBYDSFBNFJBNCUHQ3P5IMUDA5CNFSM4H4Q3I5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6NUTA#issuecomment-507304524>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACHF6HCESHPPR5ECMH3K6LP5IMUDANCNFSM4H4Q3I5A>
.
|
I think the fundamental question is how many stock color maps will we support? It seems to me the extremes are “a few” and “hundreds”. I support @tacaswell idea of a subpackage that has a low bar for entry of new colormaps but keeps them out of the basic list. If one of those becomes wildly popular, it can be moved to the main list. |
@WeatherGod But, my colormap has nothing to do with theirs. |
a co-worker of mine who has better eyes than me pointed out the yellows in
your colormap that aren't in parula and a few other differences (in fact,
he initially thought he was looking at viridis), so, I'll concede that your
colormap is different enough. It is something we do have to worry about,
though, because the boundaries of such copyright claims have never been
tested as far as we know. Given the complete lack of legal resources
relative to theirs, yeah, they can probably expect to effectively ban
colormaps.
I do still have concerns about your colormap based on the output from viscm
showing some perceptual discontinuities, particularly those yellows.
…On Mon, Jul 1, 2019 at 11:26 AM Ellert van der Velden < ***@***.***> wrote:
@WeatherGod <https://github.com/WeatherGod> But, my colormap has nothing
to do with theirs.
I had never even seen or heard about it before you mentioned it.
I mean, they cannot really expect to ban any colormap that looks a little
bit like one they have copyrighted, right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14668?email_source=notifications&email_token=AACHF6FUXJEWMZ6OAIDT3RTP5IO4BA5CNFSM4H4Q3I5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6PQBQ#issuecomment-507312134>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACHF6HZG74E6DWRSQRZTPTP5IO4BANCNFSM4H4Q3I5A>
.
|
Yeah, I noticed that as well in the output. |
So, next week, I have a conference, but the week after I can have a look and see if I can use |
So, as the rainforest colormap was originally not made using |
Alright, instead of trying to figure out how to do this, I simply recreated the entire colormap in I also noticed that when using the new spline method (CatmulClark), the perceptual color derivative always looks the way as in this plot, regardless of the actual colormap (I made a completely random one and it still looked the same). |
@tacaswell Any updates on the idea of adding an MPL subpackage specifically for colormaps? |
For what its worth I would very much like a full range brightness and colour gamut map that is still perceptually uniform. I sometimes run into situations where I feel as though I don't quite have enough dynamic range to see all the features on my plots. Being able to quickly switch colour maps to fix this would be nice. At present I usually end up fiddling with the scale to truncate or otherwise modify the data (e.g. log scales) to try and get what I want to show up. I am not colour blind and most of my plots never escape a Jupyter notebook. I rarely have time or need to annotate them. The default colour map is a great for many reasons but sometimes I would like to get away from its compromises and use my eye's full range. |
@gstorer Currently, this colormap (and a new one I made a few days ago) is included in my e13Tools package. I would really like for the rainforest colormap to become available through MPL itself, as I think it is a great addition to it and it will have a much bigger reach, but for the time being I provide it through e13Tools. |
@1313e putting it in a stand-alone package would probably be better than a bigger tool package. I took a look at the source and I'm not seeing how it is made available. If you use |
@tacaswell I am using the Yeah, putting it into its own package would maybe make it easier, but to make a package for simply a single colormap is kinda weird in my opinion. However, having said that, currently, others would still require e13Tools and need to import it. |
Now that the discussion on the |
Just for future references, this colormap (and many others) is now available in the CMasher package. |
My question is pretty simple: How can I add a colormap to Matplotlib?
Inspired by the viridis and cividis colormaps, I have made a new perceptually uniform sequential colormap called 'rainforest' (see below for the colormap and its
viscm
output).I originally made this colormap specifically for my PRISM package as an alternative to viridis and cividis, as I felt that these colormaps did not have enough variation in color for what I wanted to use the colormap for.
However, I have been asked by a few people now if I am planning on adding the colormap to Matplotlib or release it as a standalone package, as they would like to use it.
For that reason, I am asking here how I can add it.
Can I do this simply by forking Matplotlib, adding the RGB data to the
lib/matplotlib/_cm_listed.py
file and opening a PR about it?Thanks in advance.
EDIT: This colormap is now included in my CMasher package.
The text was updated successfully, but these errors were encountered: