Bivariate colormaps, where the color returned is a function of two values not one, are sometimes used in choropleth maps and are also useful for visualising complex functions where we might want to use color for phase information and brightness for amplitude.
Obviously some simple bivariate colormaps are just the product of two independent functions, eg Darker[Hue[x],y]
, however I have one for which this is not the case.
I have seen the post and excellent answer here and I already have a package I use to add a few normal colormaps into colordata (the viridis, inferno, plasma, and magma schemes from matplotlib). In the post linked above new color schemes are added with a definition such as:
{{"Viridis", "matplotlib viridis", {}}, {"Gradients"}, 1, {0, 1}, viridisColorPoints, ""}
Of this I (think) understand all apart from the single 1
. My hope was that turning this into a 2
, and maybe fudging some other bits, would create a bivariate map... I have had no success.
So is there anyway / can anyone find anyways, to allow us to build in 2d colorschemes, which we can then access like:
ColorData["bivariateColoring"][0.3,0.4]
Here is the colormap I would like to implement:
EDIT: The Lightness axis is incorrectly labelled going from 0 to 1 instead of 1 to 0!
Comments
Post a Comment