|
From: Lionel R. <lro...@li...> - 2006-07-07 13:14:39
|
Hi Jeff, thanks for the hint, I just need to import one personal GMT file maked a ti= me=20 ago and used in a plotting project based on GMT, which I try to convert to= =20 matplotlib. Now I have a little problem to plot a basemap with subplots. Trying to use= =20 contour_demo.py mixed with hist.py to have a map with contours and under it= =20 an histogram of values, I can't set the colorbar else I loose the map. I=20 think I have a problem with axes but I'm not very familar with subplotting. Have you an idea of how can I do that? Le Vendredi 07 Juillet 2006 13:53, Jeff Whitaker a =C3=A9crit=C2=A0: > Lionel Roubeyrie wrote: > > Hi all, > > Is it possible to import colormap file from GMT (.cpt) to basemap? If y= es > > 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 =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |