Re: Axis tickmark labels

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu May 23 2013 - 09:26:06 MDT

Hello,
You typically do not need to set pmTickMarkDisplayMode. I would try
removing the line: res@pmTickMarkDisplayMode = "Always", as I do not see
anything else wrong with your script. If that doesn't help or if the
problem is not solved please respond to ncl-talk only..
Adam

On 5/22/13 10:43 PM, Xin Xi wrote:
> Hi,
> I am trying to make this panel plots of CE projection. The tickmark
> labels show two different sets superimposed with each other. I donot
> know how that happened. Can anyone help correct it?
> The plot is here:
> https://docs.google.com/file/d/0B6_o_ewNAZPXVkZfQzRwOW93cHc/edit?usp=sharing
>
> and here is my res:
> type = "newpng"
> outfile = "luh"
> wks = gsn_open_wks(type,outfile)
> gsn_define_colormap(wks, "BlueWhiteOrangeRed")
>
> res = True
> res@gsnDraw = False
> res@gsnFrame = False
> res@gsnSpreadColors = True
> res@gsnSpreadColorStart = 144
> res@gsnSpreadColorEnd = -1
>
> res@cnFillOn = True
> res@cnLinesOn = False
> res@cnLineLabelsOn = False
> res@cnFillMode = "AreaFill"
> res@cnLevelSelectionMode = "ExplicitLevels"
> res@cnLevels = (/.1, .2, .3, .4, .5, .6, .7, .8, .9/)
>
> res@lbLabelBarOn = False
> res@pmTickMarkDisplayMode = "Always"
>
> res@mpProjection = "CylindricalEquidistant"
> res@mpLimitMode = "LatLon"
> res@mpMinLatF = latS
> res@mpMinLonF = lonL
> res@mpMaxLatF = latN
> res@mpMaxLonF = lonR
>
> res@mpFillOn = False
> res@mpOutlineOn = True
> res@mpDataBaseVersion = "MediumRes"
> res@mpOutlineBoundarySets = "AllBoundaries"
> res@mpNationalLineThicknessF = 1.5
> res@mpGeophysicalLineThicknessF = 1.5
> res@mpGridAndLimbOn = True
> res@mpGridSpacingF = 5.0
> res@mpGridLineThicknessF = 0.5
>
> res@gsnAddCyclic = False
>
> nplt = 2*nyear
> plts = new(nplt,graphic)
>
> res@tmXTOn = False
> res@tmXBOn = False
> res@tmYROn = False
> res@tmYLLabelsOn = True
> res@tmYLOn = True
> res@tmYLLabelFontHeightF = 0.035
> res@tmYLLabelDeltaF = -0.5
>
> tifont = 0.05
> res@tiYAxisFontHeightF = tifont
>
> do i = 0, nyear-1
> if (i .eq. 0) then
> res@tiXAxisSide = "top"
> res@tiXAxisFontHeightF = tifont
> res@tiXAxisString = "Cropland"
> else
> res@tiXAxisOn = False
> end if
>
> if (i .eq. nyear-1) then
> res@tmXBOn = True
> res@tmXBLabelsOn = True
> end if
>
> res@tiYAxisString = years(i)
> plts(2*i) = gsn_csm_contour_map_ce(wks,crop_luh(i,:,:),res)
> end do
>
>
> res@tmXBOn = False
> res@tmYLOn = False
> res@tiYAxisOn = False
> res@tmYROn = True
> res@tmYRLabelsOn = True
>
> do i=0,nyear-1
> if (i .eq. 0) then
> res@tiXAxisOn = True
> res@tiXAxisSide = "top"
> res@tiXAxisFontHeightF = tifont
> res@tiXAxisString = "Pasture"
> else
> res@tiXAxisOn =False
> end if
> if (i .eq. nyear-1) then
> res@tmXBOn=True
> res@tmXBLabelsOn = True
> end if
>
> plts(2*i+1) = gsn_csm_contour_map_ce(wks,past_luh(i,:,:),res)
> end do
>
> ; create panel
> resP = True
> resP@gsnMaximize = True
> resP@gsnPanelLabelBar = True
> resP@pmLabelBarWidthF = 0.50
> resP@pmLabelBarHeightF = 0.05
>
> resP@lbTitleString = "%"
> resP@lbTitlePosition = "Right"
> resP@lbTitleFontHeightF = 0.015
>
> resP@lbLabelFontHeightF = 0.015
> resP@lbLabelStrings = (/10, 20, 30, 40, 50, 60, 70, 80, 90/)
> xfadj = 0.5
> resP@gsnPanelXF =
> (/-1,xfadj,-1,xfadj,-1,xfadj,-1,xfadj,-1,xfadj,-1,xfadj/)
>
> resP@gsnPanelLeft = 0.1
> resP@gsnPanelRight = 0.95
> resP@gsnPanelBottom = 0.05
> resP@gsnPanelTop = 0.95
> resP@gsnPanelScalePlotIndex = 3
> resP@gsnPanelYWhiteSpacePercent = 2
> resP@gsnPanelXWhiteSpacePercent = 0
> gsn_panel(wks,plts,(/nyear,2/),resP)
>
>
>
> _______________________________________________
> 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 May 23 09:26:14 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT