<div dir="ltr"><pre>You will have to put in the correct numbers. ncl-talk has no idea to what the 'time' axis refers refers <br></pre><pre><br> res@tmYLMode = "Explicit"
res@tmYLValues = (/3000,3500,4000,.....,8000/)
res@tmYLLabels = (/"Jan","Feb",.....,"Dec"/)
</pre></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 12, 2017 at 11:16 PM, Lyndon Mark Olaguera <span dir="ltr"><<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>I'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.<wbr>edu/Document/Functions/Built-<wbr>in/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'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 ("hpass_SCS.nc","r")</div><div> prec = f->PREC(:,0,0) ; one value/year</div><div> time = prec&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,<wbr>s0,dj,jtot,npad,noise,<wbr>isigtest,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 = "period" ; Y axis</div><div> power&period = w@period</div><div><br></div><div> power!1 = "time" ; X axis</div><div> power&time = time</div><div><br></div><div> power@long_name = "Power Spectrum"</div><div> power@units = "unit^2"</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("png","wavelet") ; send graphics to PNG file</div><div> res = True ; plot mods desired</div><div> res@cnFillOn = True ; turn on color</div><div> res@cnFillPalette = "BlAqGrYeOrReVi200" ; set color map</div><div> res@cnFillMode = "RasterFill" ; 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 = "Vertical" ; vertical label bar</div><div> res@trYReverse = True ; reverse y-axis</div><div> ;res@tmLabelAutoStride = True</div><div> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels</div><div> res@cnMinLevelValF = 0.0 ; set min contour level</div><div> res@gsnLeftString = "Wavelet Power"</div><div> plot = gsn_csm_contour(wks,power({0:<wbr>120},:),res)</div><div>end</div></div><div><br></div><div><br></div><div>I'll appreciate any help.</div><div><br></div><div>Many thanks,</div><div><br></div><div><br></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>