Re: Colorbar with fixed level and color [message #81424 is a reply to message #81422] |
Fri, 14 September 2012 06:12   |
Rosie
Messages: 27 Registered: September 2012
|
Junior Member |
|
|
On Friday, September 14, 2012 1:53:07 PM UTC+1, Rosie wrote:
> On Friday, September 14, 2012 1:13:04 PM UTC+1, David Fanning wrote:
>
>> Rosie writes:
>
>>
>
>>
>
>>
>
>>>
>
>>
>
>>> Hello,
>
>>
>
>>>
>
>>
>
>>> I have created contour plot with following color and levels
>
>>
>
>>>
>
>>
>
>>> loadct,39
>
>>
>
>>> nl=21; nl,number of level
>
>>
>
>>> color=(findgen(nl+1)*10)+50
>
>>
>
>>> level=findgen(nl)*.5-5
>
>>
>
>>>
>
>>
>
>>> Would anyone kindly tell how to plot colorbar with this specification.
>
>>
>
>>
>
>>
>
>> Well, those specifications don't make too much sense, since
>
>>
>
>> there is no "color" at index 260. But, what I *think* you
>
>>
>
>> are trying to do is something like this:
>
>>
>
>>
>
>>
>
>> cgLoadCT, 39, Clip=[50,254], NColors=20, Bottom=1
>
>>
>
>> cgColorBar, NColors=20, Bottom=1, /Discrete, $
>
>>
>
>> Range=[Min(level),Max(level)], Charsize=0.75
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>>
>
>>
>
>> David
>
>>
>
>> --
>
>>
>
>> David Fanning, Ph.D.
>
>>
>
>> Fanning Software Consulting, Inc.
>
>>
>
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
>>
>
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>
>
> Thanks a lot, David. It worked !
>
> Regards,
Few more questions:
1)Can I do less than -4 with < sign and more than +4 with > sign ?
2)Another problem is with green colour, they can hardly be differentiated.
3)I used the command division=10, minor=2. But it did not worked.
Regards,
Rosie
|
|
|