Re: tmYLLabelsOn; tmYLOn problem

From: Yan Bao <ybao2009_at_nyahnyahspammersnyahnyah>
Date: Fri Sep 03 2010 - 12:22:36 MDT

Hi, All
     I'd like to post the entire my script to put my problme more
specific.Thanks. Hope you can help me to find something.
     Thanks,

     Yan

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin

  dir = "/Users/DATA/"
  f11 = addfile (dir+"a1.nc", "r")
  f11 = addfile (dir+"a2.nc", "r")
  pp11 = f11->ttt(:,:,:)
  plot1 =new(10,graphic)

;********************************************************
; create plots
;********************************************************
  wks = gsn_open_wks("pdf" ,"aaa.map") ; ps,pdf,x11,ncgm,eps
; gsn_define_colormap(wks,"precip2_17lev"); select color map
gsn_define_colormap(wks,"temp_19lev"); select color map

 res = True ; plot mods desired
 res@gsnDraw = False
 res@gsnFrame = False

res@gsnAddCyclic = False
res@mpLimitMode = "Corners"
res@mpLeftCornerLatF = lat2d(0,0)
res@mpLeftCornerLonF = lon2d(0,0)
res@mpRightCornerLatF = lat2d(mlat-1,mlon-1)
res@mpRightCornerLonF = lon2d(mlat-1,mlon-1)
res@pmTickMarkDisplayMode = "Always"

res@cnFillOn = True ; turn on color
res@cnLinesOn = False ; turn contour lines
res@gsnSpreadColors = True ; use entire color map
res@lbLabelAutoStride = False; let NCL determine label spacing
res@lbLabelBarOn = False
res@mpPerimOn = True
res@mpOutlineBoundarySets = "GeophysicalAndUSStates"
res@mpFillOn = True
res@mpLandFillColor = (/-1/)
res@mpFillDrawOrder = "PostDraw"
res@tiMainFontHeightF = 0.027

res@cnLevelSelectionMode = "ManualLevels"
res@cnMinLevelValF = 50.
res@cnMaxLevelValF = 150.0 ;3000.0
res@cnLevelSpacingF = 5. ;50.0

;TickMark

res@tmXBLabelsOn = False
res@tmXBOn = False
res@tmXBLabelFontHeightF = 0.021
res@tiMainString = "CCSM 2020s"
plot2(0)=gsn_csm_contour_map_ce(wks,ttt(:,:,0),res)
res@tmYLOn = False
plot2(1)=gsn_csm_contour_map_ce(wks,ttt(:,:,1),res)
res@tmXBLabelsOn = True
res@tmXBLabelsOn = True
res@tmXBOn = True
res@tmYLLabelsOn = True
res@tmYLOn = True
plot2(2)=gsn_csm_contour_map_ce(wks,ttt(:,:,3),res)
res@tmYLLabelsOn = False
res@tmYLOn = False
plot2(3)=gsn_csm_contour_map_ce(wks,ttt(:,:,4),res)

resP = True
resP@txString = "aaa "
resP@gsnPanelLabelBar = True
resP@lbLabelAutoStride = True
resP@lbLabelFontHeightF = 0.011 ; make labels smaller
resP@cnLabelBarEndStyle = "IncludeMinMaxLabels" ; turn on end labels
resP@gsnPanelFigureStringsFontHeightF=0.012
resP@amJust = "TopLeft"
resP@gsnPanelFigureStringsBackgroundFillColor ="transparent"
resP@gsnPanelFigureStringsPerimOn = False
resP@gsnPanelFigureStrings= (/"(a)","(b)","(d)","(e)"/)
resP@gsnPanelLabelBar = True
resP@lbLabelAutoStride =True
;resP@lbLabelAngleF = 45 ; angle labels
resP@lbLabelFontHeightF = 0.011 ; make labels smaller
resP@cnLabelBarEndStyle = "IncludeMinMaxLabels" ; turn on end labels
gsn_panel(wks,plot2,(/2,2/),resP)

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 3 11:22:43 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 16 2010 - 11:05:25 MDT