All,
I want to control the value of Y-axis to range 0. to 0.5. I add two lines:
res@tiYMin = 0.0
res@tiYMaxF = 0.5
But it doesn't work:
warning:tiYMin is not a valid resource in pdf_xy at this time
warning:tiYMaxF is not a valid resource in pdf_xy at this time
Thank for any suggestions or solutions!
Hongli
-------------------------
http://www.ncl.ucar.edu/Applications/Scripts/pdf_1.ncl
begin
a = random_normal (0,50, (/64,128/))
b = random_chi (2 , (/1000/))
c = random_gamma (75,2, (/50,100/))
ap = pdfx(a, 0, False) ; default number of bins
bp = pdfx(b, 0, False)
cp = pdfx(c, 0, False)
;------------------------------------------------
; Plot each PDF
;------------------------------------------------
nVar = 3
plot = new ( nVar, "graphic")
wks = gsn_open_wks ("x11","pdf")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@xyLineThicknessF = 2
res@tiYAxisString = "PDF (%)"
res@tiYMin = 0.0
res@tiYMaxF = 0.5
res@gsnCenterString = "Univariate PDF: Normal"
plot(0) = gsn_csm_xy (wks, ap@bin_center, ap, res)
res@gsnCenterString = "Univariate PDF: Chi (df=2)"
plot(1) = gsn_csm_xy (wks, bp@bin_center, bp, res)
res@gsnCenterString = "Univariate PDF: Gamma (75,2)"
plot(2) = gsn_csm_xy (wks, cp@bin_center, cp, res)
resP = True
resP@txString = "Univariate PDFs of Three Variables"
resP@gsnPanelRowSpec = True ; tell panel what order to
plt
gsn_panel(wks,plot,(/1,2/),resP)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 1 16:22:33 2010
This archive was generated by hypermail 2.1.8 : Thu Mar 04 2010 - 15:07:06 MST