[Matplotlib-users] viridis colormap model

Carnë Draug carandraug at octave.org
Thu Oct 1 20:42:29 CEST 2015


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


More information about the Matplotlib-users mailing list