Hi Xiaoming,
If you want to specify that a single contour line be colored a specific
color, then you could use the following code:
gsn_define_colormap(wks,"Cat12")
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLevels = ispan(960,1030,10)
res@cnMonoLineColor = False
res@cnLineColors = (/1,1,1,9,1,1,1,1/) ; set to color indices of
; Cat12 colormap
alternatively, if you have many contour levels, and you want to specify
named colors:
arr = new(dimsizes(cnLevels),"string")
arr = "black"
arr(3) = "red"
res@cnLineColors = arr
Hope that helps,
Adam
On 01/10/2011 12:11 PM, Xiaoming Sun wrote:
>
> Dear All,
>
> Does anybody know how to draw contour lines with a specific value (not only
> negative or positive), for example the contour line with a value of 990, in
> different color with the rest of the other contour lines?
>
> Thanks a lot?
>
> Best Regards,
>
> Xiaoming
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- __________________________________________________ Adam Phillips asphilli@ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 Climate and Global Dynamics Division fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Jan 10 12:19:43 2011
This archive was generated by hypermail 2.1.8 : Thu Jan 13 2011 - 09:24:21 MST