Dear Mary,
Please have a look on my code is given below. If I don't set trXMinF and trXMaxF it is working but the figure is not correct the lines start away from the y-axis. Please your help in this regard will be appreciable.
thanks again,
kim
*******************
--------------------------------------
--------------------------------------
f = addfile("shtfl.sfc.gauss.2003.nc","r")
f1 = addfile("shtfl.sfc.gauss.2002.nc","r")
z = short2flt(f->shtfl(120:243,:,:))
z1= short2flt(f1->shtfl(120:243,:,:))
printVarSummary(z)
printVarSummary(z1)
time = z&time
time = z1&time
utc = ut_calendar(time,0) ; yr, mo, dy, hr, mn, sc
mons = floattoint(utc(:, 1)) ; Values from 1 to 12
days = floattoint(utc(:, 2)) ; Values from 1 to 31
day_1 = ind(days.eq.1)
mon_1 = mons(day_1)
smonths = (/"","J", "F", "M", "A", "MAY", "JUN",\
"JUL", "AUG", "SEP", "OCT", "N", "D"/)
tm_major_values = time(day_1)
tm_major_labels = smonths(mon_1)
zRegion = wgt_areaave_Wrap(z(:,{15:40},{50:100}),1.0,1.0,0)
z1Region = wgt_areaave_Wrap(z1(:,{15:40},{50:100}),1.0,1.0,0)
; printVarSummary(z1Region)
; printMinMax(z1Region, True)
;**********************************
wks = gsn_open_wks ("x11","sh")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@tmLabelAutoStride = True
res@xyLineColors =(/"red"/)
res@xyLineThicknesses = 2.0
res@tiMainString = "”
res@tmXBMode = "Explicit" ; Define own tick mark labels.
res@tmXBValues = tm_major_values
res@tmXBLabels = tm_major_labels
res@tmXTOn = False ; Turn off tickmarks and labels
res@tmYROn = False
res@trXMinF = 17552088 ; set minimum X-axis value
res@trXMaxF = 17555040 ; set maximum X-axis value
res@tiYAxisString = "SHFL(W/m^2)"
res@vpHeightF= 0.4
res@vpWidthF = 0.8
plotA = gsn_csm_xy(wks, time,zRegion,res)
;**************************************
res@xyLineColors = (/"blue"/)
res@trXMinF = 17543328 ; set minimum X-axis value
res@trXMaxF = 17546280 ; set maximum X-axis value
plotB = gsn_csm_xy(wks, time,z1Region,res)
overlay(plotA, plotB)
draw(plotA)
frame(wks)
end
--- On Mon, 2/22/10, Mary Haley <haley@ucar.edu> wrote:
From: Mary Haley <haley@ucar.edu>
Subject: Re: fatal:XyPlotChanges: error setting overlay object view
To: "Kim" <r4rid@yahoo.com>
Cc: ncl-talk@ucar.edu
Date: Monday, February 22, 2010, 5:55 AM
Dear Kim,
How are you doing the overlay, and when are you setting trXMinF and trXMaxF? It would help if I could see a script.
--Mary
On Feb 21, 2010, at 9:57 PM, Kim wrote:
Dear NCL users
I’m trying to xy-plotA & plotB. Individually and also when I overlay (plotA, plotB) without trXMinF and trXMax resources it is working properly. When I set trXMinF and trXMax during their overlaying it does not work. If I not set these recourses then the lines are not starting at the initial point. Is there any resource or function available in NCL.
Thanks
kim
**************
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom 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:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom 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:XyPlotChanges: error setting overlay object view
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Feb 22 20:02:48 2010
This archive was generated by hypermail 2.1.8 : Tue Feb 23 2010 - 08:26:41 MST