Saturday, January 25, 2014

GMT standard color palettes

GMT (Generic Mapping Tools) (http://gmt.soest.hawaii.edu/) is a great mapping tool. I'm hoping to use it more in the future, but for the meantime I wanted to recreate some of the it's standard color palettes in R. Unfortunately, I couldn't find documentation of the precise rgb color levels used, so I ended up "stealing" them from the .png images on this website: http://www.geos.ed.ac.uk/it/howto/GMT/CPT/palettes.html

3 comments:

The GMT colour palettes are defined in $SRC/share/cpt/ (where $SRC is the folder where you unzip the gmt 5 source code). Names of the palettes are in $SRC/share/conf/gmt_cpt.conf.

The CPT files only seem to specify colours at the break, and not the interpolation method. Is it nearest colour, linear interpolation in RGB, linear in HSV? Other? Answer must bein thesource code somewhere...

Welcome!

me nugget has become a depot for R-related information, tricks and tips. One might even find some science-worthy nuggets buried in this eclectic collection. Most of the functions described on the blog can be found bundled in the sinkr package (link).Comments and suggestions are heartily welcome.Contact: ningkiling[at]gmail.com