Re: Contour labels not plotted

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 04 2011 - 08:20:55 MDT

The algorithm for labeling contour lines is a bit complicated, and it's possible that if your contours are too "twisty", NCL will decide not to put any labels on the contours.

My suggestion is to look at the examples on this page:

http://www.ncl.ucar.edu/Applications/contourLab.shtml

The examples show various ways to improve the labeling of your contour lines.

Example conLab_6.ncl may be of particular interest.

--Mary

On Aug 3, 2011, at 3:53 PM, Agnes Lim wrote:

> Hi
>
> I had used the following code segment to plot contours of H_increments.
> After setting cnLineLabelsOn=True, I am still not getting the contour
> lines labeled.
>
> Agnes
>
> ============================================
> wks = gsn_open_wks("pdf"
> ,"2008-05-21_21_00_GHGT_T_anal_incre_"+i) ; open a ps file
> res = True ; plot mods desired
> gsn_define_colormap(wks,"BlWhRe") ; select color map
> res@gsnSpreadColors = True
> res@mpLandFillColor = -1 ; set land to be transperant
> res@mpOutlineOn = True
> res@mpOutlineBoundarySets = "AllBoundaries"
> res@mpProjection = "LambertConformal"
> res@mpEllipticalBoundary = False ; If you want elliptical
> res@cnFillOn = False
> res@cnLineLabelsOn = True
> res@cnLinesOn = True
> res@lbBoxLinesOn = True
> res@mpMinLatF = 7 ; range to zoom in on
> res@mpMaxLatF = 56
> res@mpMinLonF = -170
> res@mpMaxLonF = -53
> res@tmXTOn = False ; Turn off top tickmarks and labels
> res@tmYROn = False ; Turn off left tickmarks and labels
> res@tmXBLabelFontHeightF = 0.01 ; resize tick labels
> res@tmYLLabelFontHeightF = 0.01
> res@pmTickMarkDisplayMode = "Always"
> res@lbLabelAutoStride = True
> res@mpLambertParallel1F = wrf_bkg_no_airs@TRUELAT1
> res@mpLambertParallel2F = wrf_bkg_no_airs@TRUELAT2
> res@mpLambertMeridianF = wrf_bkg_no_airs@CEN_LON ; or f@CEN_LON
> res@gsnMaskLambertConformal = True
> res@lbLabelBarOn = True
> res@cnLevelSelectionMode = "ExplicitLevels"
> res@cnLevels=(/-30, -15, 0, 15, 30/)
> res@gsnAddCyclic = False
> res@gsnContourZeroLineThicknessF = 0
> res@gsnContourNegLineDashPattern = 1 ; sets negative contours
> to dash pattern 1
> res@gsnContourLineThicknessesScale = 2
> plot=gsn_csm_contour_map(wks,H_increment_airs(i,:,:), res)
>
>
> _______________________________________________
> 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
Received on Thu Aug 4 08:21:02 2011

This archive was generated by hypermail 2.1.8 : Fri Aug 05 2011 - 14:53:55 MDT