[ncl-talk] uneven colorbar

Dennis Shea shea at ucar.edu
Wed Nov 12 08:30:58 MST 2014


Also:

       wks    = gsn_open_wks(...)
       colors = (/"white","black","Snow"     \
               ,"PaleTurquoise","PaleGreen","SeaGreen3" ,"Yellow"  \
               ,"Orange","HotPink","Red","Violet", "Purple", "Brown", "Black"/)
       gsn_define_colormap(wks, colors)               ; generate new color map


       res at cnLevelSelectionMode = "ExplicitLevels"
       res at cnLevels             = (/0.1,1,5,10,20,30,50,75,100,150/) ; "mm/day"




On Wed, Nov 12, 2014 at 8:10 AM, Mary Haley <haley at ucar.edu> wrote:

> You can set:
>
> res at cnLevelSelectionMode = "ExplicitLevels"
> res at cnLevels = (/-10,-8,-6,-4,-2,0,2,4/)
>
> "cnLevels" can be any spacing of values that you want. They don't have to
> be equally spaced, but they do have to be increasing.
>
> If you need to match certain levels to certain colors in a color map, then
> you may want to see example "conLev_4.ncl" at:
>
> http://www.ncl.ucar.edu/Applications/contourLev.shtml
>
> --Mary
>
>
> On Mon, Nov 10, 2014 at 8:03 AM, Xi Chang <xi.chang01 at gmail.com> wrote:
>
>> Hallo, Is there any way to create uneven color bar? for instence my
>> plotting values ranging from -10 to +4, and I want to always plot 0 values
>> as white. Thank you.
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141112/2a0c2bdf/attachment.html 


More information about the ncl-talk mailing list