Reply to topic  [ 5 posts ] 
cmap.i 
Author Message
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post cmap.i
The new cmap.i interpreted package adds dozens of new palettes, including the complete ColorBrewer collection, all the Matplotlib palettes, all the GMT palettes, the Gnuplot palette functions, the cubehelix color table generator, and an interface to the IDL/PVWAVE color tables. (The latter requires you to get the .tbl file or a .png file from your IDL installation or from the Web, as explained in the help for the idlct function.)

You can also scale the HSV value or HSL lightness to brighten, darken, or lighten the current palette interactively, using the gamma= and lgamma= keywords to the cmap function. Similarly, you can reverse the order of the current palette with the rev= keyword.


Sat Mar 30, 2013 3:45 pm
Profile
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post Re: cmap.i
Here are the palettes available with the new cmap command. First, the original gist palettes (now just cmap,"earth"; for example):
Attachment:
gist-cmap.png
gist-cmap.png [ 7.4 KiB | Viewed 3777 times ]


Next, a few color maps created with the mshct command (use help), which are samples of the map generator designed by Kenneth Moreland:
Attachment:
msh-cmap.png
msh-cmap.png [ 10.63 KiB | Viewed 3767 times ]


Here are the Matplotlib (a python package) color maps, excluding the ones from gist and Gnuplot:
Attachment:
mpl-cmap.png
mpl-cmap.png [ 23.51 KiB | Viewed 3777 times ]

And the palettes mentioned in the Gnuplot user manual, under their names from Matplotlib, except I added gnuplot3-5:
Attachment:
gpl-cmap.png
gpl-cmap.png [ 8.74 KiB | Viewed 3777 times ]


The next set are from more serious cartographers from GMT (Generic Mapping Tools):
Attachment:
gmt-cmap.png
gmt-cmap.png [ 25.75 KiB | Viewed 3777 times ]


The ColorBrewer maps are probably the most professional in the set. They consist of carefully chosen individual colors, for plotting a few specific values. Here, I show only the versions with the maximum number of colors, but if you have fewer levels, cmap lets you specify the carefully selected subset from ColorBrewer as well. There are three types of ColorBrewer maps: Sequential, Diverging, and Qualitative. The sequential and diverging maps look very good when interpolated to continuous color maps, while the qualitative maps do not. Most of the non-ColorBrewer palettes are sequential, a few are diverging, and none are qualitative. Here are the sequential ColorBrewer maps, both in their original discrete (maximum number of) levels, and as continuous maps:
Attachment:
cb-seq-cmap.png
cb-seq-cmap.png [ 18.56 KiB | Viewed 3777 times ]
Attachment:
cbc-seq-cmap.png
cbc-seq-cmap.png [ 22.13 KiB | Viewed 3777 times ]

Next, the diverging maps, both in original discrete form and continuous form:
Attachment:
cb-div-cmap.png
cb-div-cmap.png [ 9.34 KiB | Viewed 3777 times ]
Attachment:
cbc-div-cmap.png
cbc-div-cmap.png [ 11.03 KiB | Viewed 3777 times ]

Finally, here are the qualitative maps:
Attachment:
cb-qual-cmap.png
cb-qual-cmap.png [ 8.75 KiB | Viewed 3777 times ]


If these aren't enough, here are the IDL maps, if you get colors1.tbl from the Web:
Attachment:
idl-cmap.png
idl-cmap.png [ 85 KiB | Viewed 3777 times ]


Sun Mar 31, 2013 8:50 am
Profile
Yorick Master

Joined: Tue Mar 07, 2006 10:31 pm
Posts: 125
Location: Meudon, France
Post Re: cmap.i
Thanks Dave, this looks great!

Over the course of the next few weeks I'm volunteering to write a GUI selection tool...


Mon Apr 08, 2013 11:51 pm
Profile WWW
Yorick Master

Joined: Tue Mar 07, 2006 10:31 pm
Posts: 125
Location: Meudon, France
Post Re: cmap.i
Hi,

Done: the very recent gy plug-in now includes gycmap, a graphical user interface for cmap.

It uses the PNG images in your post above, I hope it's fine with you!


Attachments:
gycmap-screenshot.png
gycmap-screenshot.png [ 17.95 KiB | Viewed 3716 times ]
Mon Apr 15, 2013 1:24 am
Profile WWW
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post Re: cmap.i
Of course, use the png files for anything you like; the information in them is no more or less than in cmap.i, and therefore covered by the same copyright. (Even the IDL picture is available on IDL websites without any access restrictions, as well as from the free version of IDL that permits IDL users to package scripts runnable by anyone.) Incidentally, these png files are designed to make it very easy to extract the colormap itself from the png data. Each color bar is 19 pixels high and consists of 256 colors in 512 pixels horizontally. Hence
Code:
maps = png_read("gmt-cmap.png")(1:3,1:511:2,10::19);

produces an array(char,3,256,nmaps) of the 256 RGB triples for the nmaps maps shown in the picture. Of course, the cmap function itself makes it easy to generate these within yorick; the only additional information in the png files is the text giving the table names, and the organization of the pictures.


Mon Aug 12, 2013 10:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.