Lionel, Assuming you have the current version of mpl, use the "extend" kwarg:
colorbar properties: extend='neither', 'both', 'min', 'max' If not 'neither', make pointed end(s) for out-of-range values. These are set for a given colormap using the colormap set_under and set_over methods. If the colorbar is attached to a filled contour plot, however, you do not need to specify this kwarg in the colorbar call because it will be grabbed from the ContourSet object. Eric Lionel Roubeyrie wrote: > HI, > how do you set the arrows on the bottom and the top of your colorbar? I don't > find any option for that? > Thanks > > Le Vendredi 07 Juillet 2006 10:11, [EMAIL PROTECTED] a écrit : > >>On Friday 07 July 2006 4:11 pm, 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 >> >>It's possible. Here's how I've been doing it. >> >>(1) I use the gmtcolormapPylab function defined in: >>http://sourceforge.net/mailarchive/message.php?msg_id=11255878 >> >>(2) Using the above function and a GMT cpt file (e.g. >>GMT_no_green.cpt), I set a color dictionary as: >>cdict = gmtcolormapPylab("GMT_no_green") >> >>(3) I define a colormap using: >>mycmap = cm.colors.LinearSegmentedColormap("GMT_no_green",cdict,256) >> >>(4) I apply the above using cmap=mycolormap in contourf or pcolormesh. >> >>By the way, in case you don't know of the following site, it has an >>exhaustive selection of color palettes: http://cpt-city.org.uk/ >> >>I've also attached an example of a basemap image using a cpt from the >>above site. Masked values not defined by the colormap are shown in >>gray. > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users