Re: NG Colorbar scaling [message #72585] |
Thu, 23 September 2010 17:13 |
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  |
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
|
|
|