Closed natj closed 10 years ago
This is also related to discussion in nolta/Winston.jl#105
Thanks @natj! Looks ok to me.
I think it was, in the end, better to use some function to create the maps because now they can be created for every hue, can be modified by changing the intuitive parameters and are not apache licensed.
On thing that bothers me a little bit is the name colormap
; maybe it should be something like palette
or even more specific like sequential_palette
. Then the colormap
function could be in charge of every colormap (sequential, diverging, qualitative...).
Really nice work, @natj!
Here's another potentially-interesting paper. The colormaps can be downloaded; they are GPL-licensed, whereas Color.jl is currently MIT-licensed. Can this be used to generate colormaps like those, or other variants of the "hot" colormap?
It sounds as if you're still planning on extending this further, but let me know when you think this is ready to merge. @dcjones knows more about color than I do, he may have some commentary too.
A nice thing about this function is that it yields decreasing luminosity so the colormaps are printer- and colorblind friendly already! A map similar to the "hot" colormap is definitely doable, too. I was also planning to add some other multi-hue presets, later on.
If you want to merge everything at once, there are still few things I want to add like option to create diverging colormaps. I'll let you know when I have all of the things done. I am also open to suggestions & changes if you have anything in your mind.
I now have segregated the sequential_palette
and diverging_palette
into two separate functions. Everything should be ready for merge @timholy ! I also added the colormap
function to handle the predefined colormaps. If it is too much I can remove it, as I am not sure if Winston & Gadfly should have their own functions for this. I am going to add some more predefined maps later on, either to Winston or to here, what ever you think is the best choice.
As an example, the diverging maps look like this with two different values of the cold/warm -parameter:
colormap("RdBu", 11, w=0.15)
colormap("RdBu", 11, w=0.90)
@timholy would you please update METADATA.jl ? Thanks in advance.
Done.
Provides basic tools for colormap creation using the method by Wijffelaars, M. et al. 2008.
Most simple usage is by defining the hue of the map (in LCHuv)
or by giving the name of the color
In addition, one can easily change the number of colors in the palette