Hi

I saw the new default colormap viridis and I was wondering about the

function that was used to generated it. Looking inside the source,

I only found hardcoded values for a 256 long colormap [1].

I understand that I can interpolate this to get a colormap of any

length. However, what I'm really trying to find is the function that

was used to generate those values in the first place. I'm not so much

interested in the actual python code to do it, my interest is purely the

mathematical model behind it.

Is this published anywhere? If not, can anyone tell me where to find

the model?

Thank you

Carn?

[1] https://github.com/matplotlib/matplotlib/blob/b9710e674878799f9b7279802291a3d245b36e08/lib/matplotlib/_cm_listed.py#L774

The code used to generate all of the new colormaps is in these repositories:

https://github.com/BIDS/colormap

https://github.com/matplotlib/viscm

See also the appendix at the bottom of this page:

http://bids.github.io/colormap/

As well as Stefan and Nathaniel's talk at this year's scipy:

https://www.youtube.com/watch?v=xAoljeRJ3lU

## ···

On Thu, Oct 1, 2015 at 1:42 PM, Carn? Draug <carandraug at octave.org> wrote:

Hi

I saw the new default colormap viridis and I was wondering about the

function that was used to generated it. Looking inside the source,

I only found hardcoded values for a 256 long colormap [1].

I understand that I can interpolate this to get a colormap of any

length. However, what I'm really trying to find is the function that

was used to generate those values in the first place. I'm not so much

interested in the actual python code to do it, my interest is purely the

mathematical model behind it.

Is this published anywhere? If not, can anyone tell me where to find

the model?

Thank you

Carn?

[1]

https://github.com/matplotlib/matplotlib/blob/b9710e674878799f9b7279802291a3d245b36e08/lib/matplotlib/_cm_listed.py#L774

_______________________________________________

Matplotlib-users mailing list

Matplotlib-users at python.org

https://mail.python.org/mailman/listinfo/matplotlib-users

-------------- next part --------------

An HTML attachment was scrubbed...

URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20151001/f51ea552/attachment.html>

Thank you. This is exactly what I was looking for.

Carn?

## ···

On 1 October 2015 at 19:46, Nathan Goldbaum <nathan12343 at gmail.com> wrote:

On Thu, Oct 1, 2015 at 1:42 PM, Carn? Draug <carandraug at octave.org> wrote:

Hi

I saw the new default colormap viridis and I was wondering about the

function that was used to generated it. Looking inside the source,

I only found hardcoded values for a 256 long colormap [1].

I understand that I can interpolate this to get a colormap of any

length. However, what I'm really trying to find is the function that

was used to generate those values in the first place. I'm not so much

interested in the actual python code to do it, my interest is purely the

mathematical model behind it.

Is this published anywhere? If not, can anyone tell me where to find

the model?

Thank you

Carn?

[1]

https://github.com/matplotlib/matplotlib/blob/b9710e674878799f9b7279802291a3d245b36e08/lib/matplotlib/_cm_listed.py#L774

The code used to generate all of the new colormaps is in these repositories:

https://github.com/BIDS/colormap

https://github.com/matplotlib/viscm

See also the appendix at the bottom of this page:

http://bids.github.io/colormap/

As well as Stefan and Nathaniel's talk at this year's scipy:

https://www.youtube.com/watch?v=xAoljeRJ3lU