[ncl-talk] Displaying a part of a color Table (color bar)

S Br sbr.climate at gmail.com
Fri Oct 25 07:30:47 MDT 2019


Dear Adam,
Thanks for the solution. It worked fine.

Best regards
S.

On Thu, Oct 24, 2019 at 6:47 PM Adam Phillips <asphilli at ucar.edu> wrote:

> Hello,
> You could do something like this to isolate the red spectrum of the
> colormap:
> cmap = read_colormap_file("temp_diff_18lev")
> printVarSummary(cmap)
> res at cnFillPalette = cmap(10:,:)
> If that does not solve your issue let ncl-talk know.
> Adam
>
> On Thu, Oct 24, 2019 at 7:55 AM S Br via ncl-talk <ncl-talk at ucar.edu>
> wrote:
>
>> Hi All,
>> In a figure, I am using the 'temp_diff_18lev' color table to display the
>> temperature anomaly (Positive and negative) values using the color bar. For
>> another figure I only have the positive temperature values for which I want
>> to use the same 'temp_diff_18lev' color table. Could you please suggest me
>> how to display the positive sides of the color bar.
>>
>> *1st Figure:*
>>  res at cnFillPalette       = "temp_diff_18lev"   ; set color map
>>   res at lbLabelBarOn        = True           ; turn off individual cb's
>>    res at cnLevelSelectionMode =  "ManualLevels"
>>    res at cnMinLevelValF       = -0.5
>>    res at cnMaxLevelValF       =  0.5
>>    res at cnLevelSpacingF      =  0.1
>>
>> *2nd Figure:*
>>  res at cnFillPalette       = "temp_diff_18lev"   ; set color map
>>   res at lbLabelBarOn        = True   ; Here I want to display only
>> positive part
>> res at cnLevelSelectionMode =  "ManualLevels"
>>    res at cnMinLevelValF       = 0.1
>>    res at cnMaxLevelValF       =  0.5
>>    res at cnLevelSpacingF      =  0.1
>>
>> Thanks.
>> S
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191025/fe882a7b/attachment.html>


More information about the ncl-talk mailing list