Re: label bar color question

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed, 07 Jun 2006 09:31:15 -0600

Hi Jerry,

Two ways you can do this.

1) you can set:
res@cnLevels = (/.00000001,5,10,20,30,40/)

; if you are drawing line labels also set this:
res@cnExplicitLineLabels = True
res@cnLineLabelStrings = (/0,5,10,20,30,40/)

; if you are drawing a label bar also set this:
res@lbLabelStrings = (/0,5,10,20,30,40/)
-----------------------------------------------
2) you can set all the 0 values to -.000000001.
; Assuming data array is called slp (dimensioned lat x lon)
slp1D = ndtooned(slp)
temp = ind(slp1D.eq.0)
slp1D(temp) = -.000000001
delete(temp)
slp = (/ onedtond(slp1D,dimsizes(slp)) /)
delete(slp1D)

Good luck.
Adam

jerry wrote:
> Hi
>
> I had the ncl scripts below :
>
> gsn_define_colormap(wks,"uniform")
> res@cnLevelSelectionMode <mailto:res_at_cnLevelSelectionMode> =
> "ExplicitLevels"
> res@cnLevels <mailto:res_at_cnLevels> = (/0,5,10,20,30,40/)
> res@cnFillColors <mailto:res_at_cnFillColors> = (/-1,3,15,25,45,55,67/)
>
> If the data = 0 the contour will show the color 3,but i need the data
> to show the color -1.
> How can i do ?
>
> Thanks
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 07 2006 - 09:31:15 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 07 2006 - 13:54:27 MDT