|
From: Jeff W. <js...@fa...> - 2006-07-07 11:53:17
|
Lionel Roubeyrie wrote: > Hi all, > Is it possible to import colormap file from GMT (.cpt) to basemap? If yes how > can we do that? > Thanks > Lionel: I had included the GMT colormaps in matplotlib, but had to take them out because of licensing issues. If you want to put them back in, put the attached file in your matplotlib install directory <sys.prefix>/lib/python2.4/site-packages/matplotlib. Then use a text editor to add the following lines to _cm.py (in the same directory) from gmt_cm import addcmaps addcmaps(datad) right above the line # reverse all the colormaps. This will give you the colormaps GMT_gebco GMT_globe GMT_haxby GMT_no_green GMT_ocean GMT_polar GMT_red2green GMT_relief GMT_seis GMT_wysiwyg and the corresponding reversed colormaps (with '_r' appended to the name). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |