Re: color contour line

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 06 Dec 2007 11:14:30 -0700

Hi MingXuan,

You can do it manually or automatically with a function. If you go the
automatic route, and are OK with the negative contours being dashed,
then you could use ColorNegDashZeroPosContour:
http://www.ncl.ucar.edu/Applications/coneff.shtml#ex6

Note that you have to load the shea_util.ncl file at the beginning of
your script in order to use the ColorNegDashZeroPosContour function.

If you would like to do it manually, you can set the
cnMonoLineColor/cnLineColors resources:
http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnMonoLineColor
http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLineColors

for example, you could do this:

gsn_define_colormap(wks,"BlWhRe")
res_at_cnLevelSelectionMode = "ExplicitLevels"
res_at_cnLevels = ispan(-5,5,1)
res_at_cnMonoLineColor = False
res_at_cnLineColors = (/4,4,4,4,4,0,30,30,30,30,30/)

Good luck,
Adam

MingXuan Chen wrote:
> Hello,
> Does anyone know how to make contour line with positive value a
> color and that with negative value another color?
> I followed gsun02n.ncl second plot with
> gsn_define_colormap(wks,"BlWhRe") , it doesn't work.
> Thank you very much for you help!
> Mingxuan
> _______________________________________________
> 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 Thu Dec 06 2007 - 11:14:30 MST

This archive was generated by hypermail 2.2.0 : Tue Dec 11 2007 - 14:19:21 MST