Hi,<div><br></div><div>I&#39;m not certain, and don&#39;t have a good way to test at the moment. However, a hint might be the variable &quot;incr = 1&quot;</div><div><br></div>Maybe print out the variable &quot;labels&quot; ... I&#39; guess that it only contains two values. Likewise for for PPT_obs&amp;time(:,1).<div><br></div><div>Hope that helps, but please write back to the list if not.</div><div><br></div><div>Rick<br><div><br>On Wednesday, November 25, 2015, Ruksana Abedin &lt;<a href="mailto:ruksana.abedin@gmail.com">ruksana.abedin@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi.<br><br></div>Can you please help me to find out why I could not plot the time axis properly?<br><br></div>Below given the script anf the ouput. The axis should show 2-10 but only showing 2-3. How can I change this to Feb-Nov?<br><br></div>Thank you for your kind support.<br><div><div><div><div><br></div><div>Best regards,<br></div><div>Ruksana<br></div><div><br><br>;*****************************************************<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl&quot;<br>;*****************************************************<br>begin<br>;***************************************************** <br>;read in data <br>;***************************************************** <br>f0=addfile (&quot;/ouce-home/students/rege1218/WAH2_SAS_Results_1985_2011/<a href="http://wah2_sas_1985_2007.part.Bdesh.ymonmean.nc" target="_blank">wah2_sas_1985_2007.part.Bdesh.ymonmean.nc</a>&quot;, &quot;r&quot;);    <br>f = addfile(&quot;/ouce-home/students/rege1218/Observations/APHRO_Asian_Monsoon_1963-2007/APHRO_Bdesh_ppt_1985_2007_ymonmean.nc&quot;, &quot;r&quot;)<br>;***************************************************** <br>; parameters<br>;***************************************************** <br> <br>PPT_mod = f0-&gt;field90(:,0,0,0)<br>PPT_mod = PPT_mod*86400<br><br>PPT_obs = f-&gt;precip<br>time = f-&gt;time<br>x = PPT_obs&amp;time<br>timax = dimsizes(time)-1<br><br>fldmean = wgt_areaave_Wrap(PPT_obs,1.0,1.0,1)<br><br>;--convert the time proleptic_gregorian calendar to UTC date <br>utc_date   = cd_calendar(time,0)<br><br>;-- set date variable names<br><br>year     = tointeger(utc_date(:,0))<br>month     = tointeger(utc_date(:,1))<br>day     = tointeger(utc_date(:,2))<br>hour      = tointeger(utc_date(:,3))<br>minute      = tointeger(utc_date(:,4))<br>second      = utc_date(:,5)<br><br>;-- write date as string (MM)<br>date_str_i = sprinti(&quot;%0.2i&quot;,month)<br><br>;-- create the time strings, plot every axis annotation<br>incr     = 1<br>labels      = (/date_str_i(0:incr)/)<br><br>;-- set t resources <br>res = True<br>res@trXMinF           = time(0)     ; time minimum on axis <br>res@trXMaxF           = time(timax)     ; time maximum on axis <br>res@tmXBMode         = &quot;Explicit&quot;           ; explicit time setting<br>res@tmXBValues         = PPT_obs&amp;time(:incr)          ; axis tick position<br>res@tmXBLabels         = labels <br><br><br>colors = (/&quot;blue&quot;,&quot;violet&quot;/)<br>labels = (/&quot;RCM_ppt&quot;,&quot;OBS_ppt&quot;/)<br><br>wks = gsn_open_wks(&quot;eps&quot;,&quot;annpptcycle&quot;)  <br><br>res =True<br>res@gsnDraw    = False<br>res@gsnFrame   = False<br>res@gsnPaperOrientation = &quot;portrait&quot;<br><br>res= True   ; plot mods desired<br>res =True<br>res@gsnMaximize= True<br>res@gsnDraw    = False<br>res@gsnFrame   = False<br>res@gsnPaperOrientation = &quot;portrait&quot;<br><br><br>res= True   ; plot mods desired<br>res@tiMainString = &quot;Bangladesh with Larger Region&quot;<br>res@tiYAxisString   = &quot;mm/day&quot; <br>res@xyLineThicknessF = (/3,3/)<br>res@trYMinF                 = 0.0<br>res@trYMaxF                 = 20.0<br><br><br>res@xyLineColor          = colors(0)<br>plot0 = gsn_csm_xy(wks,x,PPT_mod,res)      <br>     <br>res@xyLineColor          = colors(1)<br>plot1 = gsn_csm_xy(wks,x,fldmean,res)      <br>     <br>overlay(plot0,plot1)<br><br><br>; Attach a legend<br><br>lgres = True<br>lgres@lgLineColors              = colors<br>lgres@lgItemType        = &quot;Lines&quot;<br>lgres@lgLabelFontHeightF     = 0.2<br>lgres@lgBoxMinorExtentF      = 0.2<br>lgres@vpWidthF            = 0.2<br>lgres@vpHeightF         = 0.2<br>lgres@pmLegendDisplayMode     = &quot;Always&quot;<br>lgres@pmLegendWidthF          = 0.05<br>lgres@pmLegendHeightF          = 0.04<br>lgres@xyExplicitLabels         = labels<br>lgres@lgBoxMinorExtentF     = 0.3<br>legend = gsn_create_legend(wks, 2, labels, lgres)<br><br>amres                 = True <br>amres@amJust             = &quot;BottomRight&quot;     ; Use bottom right corner of box for determining its location.<br>amres@amOrthogonalPosF        = -0.22<br>amres@amParallelPosF         = 0.4<br><br>annoid  =  gsn_add_annotation(plot0, legend, amres)  ; add legend to plot <br><br>draw(plot0)<br><br>frame(wks)<br><br>end<br></div></div></div></div></div>
</blockquote></div></div>