lat and lon labels on a map

From: Matt Fearon (matthew.fearon AT XXXXXX)
Date: Thu Jun 07 2001 - 17:22:42 MDT


Dear NCL users:

I am plotting topography using the gsn_csm_contour_map in
an area; lat: 40 to 50 N, lon: 4. to 15. E. The data plots
fine. However, the lat lon labels that default are incorrect.
This seems like it should be easy correct, but I have
been unsuccessful in doing this. What resources would
allow me to explicitly label the longitude and latitude
values on the x and y axes, respectively. I have attached
the plotting portion of my script below. Any suggestions
on how to do this would be greatly appreciated.

Thank you,
Matt
matthew.fearon AT yale.edu

 wks = gsn_open_wks ("X11", "plot")
 gsn_define_colormap (wks,"gui_default") ; COLOR

 res = True
; res@vpXF = .1
; res@vpYF = .95
; res@vpWidthF = .5
; res@vpHeightF = .8

 res@gsnSpreadColors = True
 res@gsnSpreadColorStart = 4
 res@gsnSpreadColorEnd = -1
 res@gsnAddCyclic = False

 res@mpLimitMode = "Corners"
 res@mpLeftCornerLatF = latcoord(0)
 res@mpLeftCornerLonF = loncoord(0)
 res@mpRightCornerLatF = latcoord(nj-1)
 res@mpRightCornerLonF = loncoord(ni-1)

 res@mpOutlineDrawOrder = "PostDraw"
 res@mpGridLineDashPattern = 2
 res@mpPerimOn = True
 res@mpPerimDrawOrder = "PostDraw"
 res@mpOutlineOn = True

 res@mpOutlineBoundarySets = "National"
 res@mpGeophysicalLineThicknessF = 1.5
 res@mpGridAndLimbOn = True
 res@mpGridSpacingF = 1.

; res@mpMinLatF = 41.
; res@mpMaxLatF = 49.
; res@mpLabelsOn =
; res@mpCenterLonF = 9.
 res@mpGridLonSpacingF = 5.

; res@mpMinLonF = 4. ; set min lon
; res@mpMaxLonF = 15. ; set max lon
; res@mpGridLatSpacingF = .3

 res@tfDoNDCOverlay = True

 res@cnRasterModeOn = True
 res@cnFillOn = True
 res@cnLinesOn = False
 res@cnInfoLabelOn = False
 res@cnLineLabelsOn = False
 res@cnLevelSelectionMode = "ManualLevels"
 res@cnMinLevelValF = 0.
 res@cnMaxLevelValF = 3600.
 res@cnLevelSpacingF = 100.

 res@lbAutoManage = False
 res@pmLabelBarDisplayMode = "Never"
 res@lbAutoManage = False
 res@pmLabelBarDisplayMode = "Never"
 res@lbOrientation = "Horizontal"
 res@lbLabelStride = 4
 res@lbLabelFontHeightF = .012
 res@lbPerimOn = False

 txres = True
 txres@txFontHeightF = 0.02
 gsn_text_ndc(wks,"1km Alpine DEM",0.45,0.89,txres)

 plot = gsn_csm_contour_map(wks,ddem,res)

 frame(wks)



This archive was generated by hypermail 2b29 : Tue Feb 19 2002 - 09:06:05 MST