<div dir="ltr"><div class="gmail_default" style="font-size:small">Lyndon,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You might be able to use the time_axis_labels procedure. It does what Dennis suggested, but instead of you having to provide the labels and the values, you tell the procedure what format you want and it should set these resources for you.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><br></div><div class="gmail_default">Right before you call your plotting function, try this:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default">  restick = True<br></div><div class="gmail_default">  restick@ttmFormat = &quot;%c&quot;</div><div class="gmail_default">  time_axis_labels(prec&amp;time,res,restick)</div><div class="gmail_default"><br></div><div class="gmail_default">This will attach tmXBValues, tmXBLabels, and tmXBMode to your &quot;res&quot; variable, with the appropriate values.</div><div class="gmail_default"><br></div><div class="gmail_default">This does depend on your &quot;time&quot; array being in the same type of units expected by functions like cd_calendar.</div><div class="gmail_default"><br></div><div class="gmail_default">To see what formats are available, go to:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml">http://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml</a></div><div><br></div><div>Also see some examples at:</div><div><br></div><div><a href="http://www.ncl.ucar.edu/Applications/time_labels.shtml">http://www.ncl.ucar.edu/Applications/time_labels.shtml</a><br></div><div><br></div><div>--Mary</div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 13, 2017 at 10:28 AM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That should be:<br><br><pre> res@tmXBMode     = &quot;Explicit&quot;
 res@tmXBValues   = (/3000,3500,4000,.....,8000/)  ;  whatever
 res@tmXBLabels   = (/&quot;Jan&quot;,&quot;Feb&quot;,.....,&quot;Dec&quot;/)
</pre><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 13, 2017 at 9:12 AM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><pre>You will have to put in the correct numbers. ncl-talk has no idea to what the &#39;time&#39; axis refers refers  <br></pre><pre><br> res@tmYLMode     = &quot;Explicit&quot;
 res@tmYLValues   = (/3000,3500,4000,.....,8000/)
 res@tmYLLabels   = (/&quot;Jan&quot;,&quot;Feb&quot;,.....,&quot;Dec&quot;/)
</pre></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_6925548944524748725h5">On Thu, Jan 12, 2017 at 11:16 PM, Lyndon Mark Olaguera <span dir="ltr">&lt;<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@gmail.c<wbr>om</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_6925548944524748725h5"><div dir="ltr">Hi All,<div><br></div><div>I&#39;m plotting a wavelet based from this example <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/wavelet.shtml" target="_blank">https://www.ncl.ucar.e<wbr>du/Document/Functions/Built-in<wbr>/wavelet.shtml</a></div><div><br></div><div>Is there an easy way to make the x-axis in terms of months (Jan to Dec)?</div><div><br></div><div>Here&#39;s my code:</div><div><br></div><div><div>begin</div><div>;*****************************<wbr>*******</div><div>; create pointer to file and read in variables</div><div>;*****************************<wbr>*******</div><div>  f    = addfile (&quot;hpass_SCS.nc&quot;,&quot;r&quot;)</div><div>  prec  = f-&gt;PREC(:,0,0)                     ; one value/year</div><div>  time = prec&amp;time</div><div>  N    = dimsizes(time)</div><div>;*****************************<wbr>*******</div><div>; Remove mean and linear trend (recommended, not required)</div><div>; Missing values are not allowed.</div><div>;*****************************<wbr>*******</div><div>  prec  = dtrend(prec,False)</div><div>;*****************************<wbr>*******</div><div>; compute wavelet (Missing values not allowed due to use of FFT)</div><div>;*****************************<wbr>*******</div><div>  mother  = 0</div><div>  param   = 6.0</div><div>  dt      = 1.</div><div>  s0      = 0.25</div><div>  dj      = 0.25</div><div>  jtot    = 44</div><div>  npad    = N</div><div>  nadof   = new(2,float)</div><div>  noise   = 1</div><div>  siglvl  = .05</div><div>  isigtest= 1</div><div><br></div><div>  w = wavelet(prec,mother,dt,param,s<wbr>0,dj,jtot,npad,noise,isigtest,<wbr>siglvl,nadof)</div><div>;*****************************<wbr>*******</div><div>; create coodinate arrays for plot</div><div>;*****************************<wbr>*******</div><div>  power            = onedtond(w@power,(/jtot,N/))</div><div>  power!0          = &quot;period&quot;                        ; Y axis</div><div>  power&amp;period     = w@period</div><div><br></div><div>  power!1          = &quot;time&quot;                          ; X axis</div><div>  power&amp;time       = time</div><div><br></div><div>  power@long_name  = &quot;Power Spectrum&quot;</div><div>  power@units      = &quot;unit^2&quot;</div></div><div><br></div><div><br></div><div><div>;*****************************<wbr>*******</div><div>; initial resource settings</div><div>;*****************************<wbr>*******</div><div>  wks = gsn_open_wks(&quot;png&quot;,&quot;wavelet&quot;)             ; send graphics to PNG file</div><div>  res                     = True                  ; plot mods desired</div><div>  res@cnFillOn            = True                  ; turn on color</div><div>  res@cnFillPalette       = &quot;BlAqGrYeOrReVi200&quot;   ; set color map</div><div>  res@cnFillMode          = &quot;RasterFill&quot;          ; turn on raster mode</div><div>  res@cnRasterSmoothingOn = True                  ; turn on raster smoothing</div><div>  res@cnLinesOn           = False                 ; turn off contour lines</div><div>  res@lbOrientation       = &quot;Vertical&quot;            ; vertical label bar</div><div>  res@trYReverse          = True                  ; reverse y-axis</div><div>  ;res@tmLabelAutoStride   = True</div><div>  res@cnLevelSelectionMode = &quot;ManualLevels&quot;       ; set manual contour levels</div><div>  res@cnMinLevelValF       = 0.0                  ; set min contour level</div><div>  res@gsnLeftString       = &quot;Wavelet Power&quot;</div><div>  plot = gsn_csm_contour(wks,power({0:1<wbr>20},:),res)</div><div>end</div></div><div><br></div><div><br></div><div>I&#39;ll appreciate any help.</div><div><br></div><div>Many thanks,</div><div><br></div><div><br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>