Jae-Joon Lee wrote: > I don't think there is any user-visible support for registering a > custom colormap.
I have it almost done; I will commit it shortly. Eric > However, it seems to me that adding the colormap to > matplotlib.cm.datad distionary is enough. > Note that the value need to be a dictionary of RGB specification, not > the actual colormap instance. (I will have a more general solution than this.) > > for example, > > mycolormap = {'blue': ((0.0, 0.40000000000000002, 0.40000000000000002), > (1.0, 0.40000000000000002, 0.40000000000000002)), > 'green': ((0.0, 0.5, 0.5), (1.0, 1.0, 1.0)), > 'red': ((0.0, 0.0, 0.0), (1.0, 1.0, 1.0))} > > matplotlib.cm.datad["mycolormap"] = mycolormap > rcParams["image.cmap"]="mycolormap" > > Having a function (like jet in pylab) would not be also difficult. > Take a look at the definition of "jet" function (for example) in the > pylab.py. > > We may be better to have a proper way to register a custom colormap. > I'll try to take a more look later, but any patch will be appreciated. > > Regards, > > -JJ > > > > On Thu, Jul 30, 2009 at 3:48 AM, Philipp > Lies<philipp.l...@googlemail.com> wrote: >> Does no one have an idea? If not, this is a severe usability bug! >> >> Philipp Lies wrote: >>> Hi, >>> >>> I just created a hsv-like color map with gray levels only, now I'd like to >>> use this as default color map. But how? Calling it like hsv() does not >>> work and I did not find a hint in the documentation how to set a user >>> defined color map interactively as default color map. >>> >>> Cheers >>> >>> Philipp >>> >> -- >> View this message in context: >> http://www.nabble.com/setting-user-defined-color-map-as-default-tp24587528p24733739.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> 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 >> > > ------------------------------------------------------------------------------ > 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 ------------------------------------------------------------------------------ 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