John [H2O] wrote: > In mpl_toolkits.basemap there is a module cm. > > I have been using the cm.s3pcpn colormap for some plots which require > logarithmic coloring. The cm.s3pcpn_l colormap is also available (apparently > a linear version). > > I wanted to know whether there were any other logarithmic colormaps > available... for example, I would like to use gist_rainbow or gist_ncar, but > I haven't been able to so far using the example below. Suggestions?
In addition to specifying the cmap, specify the norm as a LogNorm instance: from matplotlib.colors import LogNorm im = imshow(.... cmap=... , norm=LogNorm(vmin=clevs[0], vmax=clevs[-1])) Try something like that. Eric > > > The relevant section of code is here: > > dmn = 0.00001 > dmx = 1000000 > logspace = 10.**np.linspace(dmn, dmx, 100) > clevs = logspace > im = m.imshow(topodat,cmap=cm.s3pcpn,vmin=clevs[0],vmax=clevs[-1]) ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users