issues with Y axis in wavelet plot

From: Daniel Barandiaran <dbarandiaran_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 26 2014 - 13:43:15 MST

Hi NCLers,

I am trying to plot output from the wavelet function. I am following the
examples given at http://www.ncl.ucar.edu/Applications/wavelet.shtml. There
seems to be a problem with setting the tickmarks, and it gives me an error
I don't understand, nor have I seen before. The relevant is attached,
along with the error message:

swewave = wavelet(swe(1,{1936:2011}),mother,dt,param,

s0,dj,jswe,nswe,noise,isigtest,siglvl,nadof)

spower = onedtond(swewave@power,(/jswe,nswe/))
spower!0 = "period"
spower&period = swewave@period
spower!1 = "time"
spower&time = years({1936:2001})

ssig = spower / conform(spower,swewave@signif,0)
copy_VarCoords(spower,ssig)

wks =
gsn_open_wks(gtype,"~/Desktop/plots/treerings/for_justin/plot_reconst")

res = True
res@gsnDraw = False
res@gsnFrame = False
res@cnFillOn = True
res@cnFillMode = "RasterFill"
res@cnRasterSmoothingOn = True
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@trYReverse = True
;res@trYLog = True
res@trYMinF = 1
res@trYMaxF = 64
res@tmYLMode = "Explicit"
res@tmYLValues = (/1,2,4,8,16,32,64/)
res@tmTLLabels = (/"1","2","4","8","16","32","64"/)
res@tmLabelAutoStride = True
res@vpHeightF = 0.455
res@vpWidthF = 0.885
res@vpXF = 0.09
res@vpYF = 0.63

res2 = True
res2@gsnDraw = False
res2@gsnFrame = False
res2@cnLevelSelectionMode = "ManualLevels"
res2@cnMinLevelValF = 0.94
res2@cnMaxLevelValF = 1.02
res2@cnLevelSpacingF = 0.01
res2@cnInfoLabelOn = False
res2@cnLineLabelsOn = False
res2@cnFillScaleF = 0.6
res2@trYReverse = True
;res2@trYLog = True
res2@trYMinF = 1
res2@trYMaxF = 64
res2@tmYLMode = "Explicit"
res2@tmYLValues = (/1,2,4,8,16,32,64/)
res2@tmTLLabels = (/"1","2","4","8","16","32","64"/)
res2@tmLabelAutoStride = True

res@gsnCenterString = "Wavelet Power"
plot(1) = gsn_csm_contour(wks,spower({0:40},:),res)
sigplot = gsn_csm_contour(wks,ssig({0:40},:),res2)
sigplot = ShadeGtContour(sigplot,0.99,17)
overlay(plot(1),sigplot)
plot(1) = ShadeCOI(wks,plot(1),swewave,years({1936:2001}),False)

draw(plot)
frame(wks)

*******************************************************

and the error statements:

warning:ContourPlotSetValues: current transformation requires trYMinF to be
within data coordinate range: resetting
warning:ContourPlotSetValues: current transformation requires trYMaxF to be
within data coordinate range: resetting
fatal:["MultiText.c":941]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for left tick
mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick
marks labels,cannot continue
fatal:PlotManagerSetValues: Error setting TickMark values
fatal:ContourPlotSetValues: error setting overlay object view
warning:tmTLLabels is not a valid resource in /plot_reconst_contour at this
time
ncl(2506) malloc: *** error for object 0x7fff5fef1cf0: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

I have tried various things to try to remedy this. If I do not set
tmYLMode = "Explicit" then everything plots fine, but then I cannot control
the tickmarks, which is what this is all about. If I set trYLog = True
then it tells me

warning:ContourPlotSetValues: Log axis not possible with irregular
coordinate spacing; switching to linear index coordinates for Y Axis

Any thoughts on how to fix this?

-- 
Danny Barandiaran
Department of Plants, Soils, and Climate
Utah State University

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 26 13:43:28 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST