SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Philipp L. <phi...@go...> - 2009年07月21日 13:19:40
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-tp24587528p24587528.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Philipp L. <phi...@go...> - 2009年07月30日 07:48:23
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.
From: Jae-Joon L. <lee...@gm...> - 2009年07月30日 17:37:44
I don't think there is any user-visible support for registering a
custom colormap.
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.
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<phi...@go...> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Eric F. <ef...@ha...> - 2009年07月30日 17:59:54
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<phi...@go...> 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
>> Mat...@li...
>> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Eric F. <ef...@ha...> - 2009年07月30日 19:41:57
Jae-Joon Lee wrote:
> I don't think there is any user-visible support for registering a
> custom colormap.
Now there is: svn r7309. Its use is illustrated via a modification of 
examples/pylab_examples/custom_cmap.py.
With just a little more work, we could make it so that anything taking a 
"cmap" kwarg will accept either a Colormap instance or the name of a 
registered instance (including builtins). Maybe I will do that later today.
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.
> 
> 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<phi...@go...> 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
>> Mat...@li...
>> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Philipp L. <phi...@tu...> - 2009年08月04日 09:36:23
On 2009年7月30日 09:41:43 -1000
Eric Firing <ef...@ha...> wrote:
> Jae-Joon Lee wrote:
> > I don't think there is any user-visible support for registering a
> > custom colormap.
> 
> Now there is: svn r7309. Its use is illustrated via a modification of 
> examples/pylab_examples/custom_cmap.py.
Awesome, works just as I need it! Keep up the good work! 
Now I'm one step closer to abandoning matlab :-D
Philipp
> 
> With just a little more work, we could make it so that anything taking a 
> "cmap" kwarg will accept either a Colormap instance or the name of a 
> registered instance (including builtins). Maybe I will do that later today.
> 
> 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.
> > 
> > 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<phi...@go...> 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
> >> Mat...@li...
> >> 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
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Philipp Lies
Max Planck Institute for Biological Cybernetics
Computational Vision & Neuroscience Group
Spemannstr. 41
D-72076 Tuebingen 
Germany
Phone: +49-7071-601-1788
Fax: +49-7071-601-552
E-Mail: phi...@tu...
http://www.kyb.mpg.de/bethgegroup
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /