comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: NG Colorbar scaling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: NG Colorbar scaling [message #72585] Thu, 23 September 2010 17:13
David Grier is currently offline  David Grier
Messages: 35
Registered: July 2010
Member
On 9/23/10 3:08 PM, Matt Haffner wrote:

>
> On Sep 23, 1:22 pm, David Grier<david.gr...@nyu.edu> wrote:
>> I want to add a colorbar to a plot created with the new object graphics
>> system. I've colored the plot symbols individually using the
>> vert_colors keyword to the plot function. Now I want to add a colorbar
>> that explains what the plot symbols' colors mean. When I add the
>> colorbar to the plot, it shows the right color table (yay), but its axis
>> is labeled with a range of values that I do not understand.
>>
>> Is there some easy way to control the range of values on the axis of the
>> colorbar object?
>>
>> Say, for instance, I want the values on the axis of the colorbar to
>> range from 0 to 1 regardless of the actual values (or colors) of the
>> plot symbols. How do I do that?
>>
>> I've tried setting the [xyz]range keywords in the colorbar function, but
>> with no luck.
>>
>> Many thanks,
>>
>> David
>
> Caveat: I've not used that NG function much yet... I would bet that
> even if you use TARGET to link to a PLOT(), it may not map your
> VERT_COLORS to the colorbar since the mapping between real data value
> and color is completely arbitrary.
>
> However, you can create your own ticks with values using the TICK*
> keywords though. Have you tried that yet? Tacking on to the example in
> the help guide for COLORBAR, I did this:
>
> IDL> c.major = 3
> IDL> c.tickname = string([0, 0.5, 1])
>
> to change the number and labels of the colorbar.
>
> mh

That's the answer! So easy when it's explained!
Many thanks,

David
Re: NG Colorbar scaling [message #72596 is a reply to message #72585] Thu, 23 September 2010 12:08 Go to previous message
Matt Haffner is currently offline  Matt Haffner
Messages: 34
Registered: October 2000
Member
Caveat: I've not used that NG function much yet... I would bet that
even if you use TARGET to link to a PLOT(), it may not map your
VERT_COLORS to the colorbar since the mapping between real data value
and color is completely arbitrary.

However, you can create your own ticks with values using the TICK*
keywords though. Have you tried that yet? Tacking on to the example in
the help guide for COLORBAR, I did this:

IDL> c.major = 3
IDL> c.tickname = string([0, 0.5, 1])

to change the number and labels of the colorbar.

mh

On Sep 23, 1:22 pm, David Grier <david.gr...@nyu.edu> wrote:
> I want to add a colorbar to a plot created with the new object graphics
> system.  I've colored the plot symbols individually using the
> vert_colors keyword to the plot function.  Now I want to add a colorbar
> that explains what the plot symbols' colors mean.  When I add the
> colorbar to the plot, it shows the right color table (yay), but its axis
> is labeled with a range of values that I do not understand.
>
> Is there some easy way to control the range of values on the axis of the
> colorbar object?
>
> Say, for instance, I want the values on the axis of the colorbar to
> range from 0 to 1 regardless of the actual values (or colors) of the
> plot symbols.  How do I do that?
>
> I've tried setting the [xyz]range keywords in the colorbar function, but
> with no luck.
>
> Many thanks,
>
> David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Piping SAV
Next Topic: Re: Piping SAV

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:03:38 PDT 2025

Total time taken to generate the page: 0.00721 seconds