From: Lionel R. <lro...@li...> - 2006-07-07 13:52:16
|
Arg, sorry, I have found the response by myself, I just have to use=20 figure.add_subplot to fix it. Le Vendredi 07 Juillet 2006 15:14, Lionel Roubeyrie a =C3=A9crit=C2=A0: > Hi Jeff, > thanks for the hint, I just need to import one personal GMT file maked a > time ago and used in a plotting project based on GMT, which I try to > convert to matplotlib. > Now I have a little problem to plot a basemap with subplots. Trying to use > contour_demo.py mixed with hist.py to have a map with contours and under = it > an histogram of values, I can't set the colorbar else I loose the map. I > think I have a problem with axes but I'm not very familar with subplottin= g. > 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 > > > 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 =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |