- 积分
- 1359
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-9-2
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 三岁最可爱 于 2020-5-18 11:46 编辑
用ncl绘制概率分布图时,明明制定了y轴值为(/0,4,8,12,16,20,24/),可是画出来ncl总是自动显示曲线所在区域,即省略掉部分值不显示。
begin
file_list = systemfunc("ls *_cat_runsum5_JJA.grb")
f_1 = addfiles(file_list,"r")
do i=1,112
var_1 := f_1[0]->aprl_GDS4_SFC(:,{40:50},{105:125})
var_1 := dim_avg_n_Wrap(var_1,(/1,2/)) * 6
var_4 := f_1->aprl_GDS4_SFC(:,{40:50},{105:125})
var_4 := dim_avg_n_Wrap(var_4,(/1,2/)) * 6
var_7 := pdfx(var_1, 0, False)
var_10 := pdfx(var_4, 0, False)
;-----------------------------------------------------
x_1 = new((/2,25/),typeof(var_7))
x_1(0,:) = var_7@bin_center
x_1(1,:) = var_10@bin_center
y_1 = new((/2,25/),typeof(var_7))
y_1(0,:) = (/var_7/)
y_1(1,:) = (/var_10/)
;************************************************
; create plot
;************************************************
m = i + 1000
name = m + "_1_PDF_JJA_114k-108k"
name_2 = "114K+" + i + "*50year"
wks = gsn_open_wks("png",name) ; send graphics to PNG file
res = True
;res@gsnDraw = False
;res@gsnFrame = False
res@xyLineThicknesses = (/2.0,2.0/)
res@xyLineColors = (/"blue","red"/)
res@xyMonoDashPattern = True ; all solid
res@tiYAxisString = "PDF (%)"
res@tiXAxisString = "Five-day precipitation(mm/5day)"
res@pmLegendDisplayMode = "Always" ; turn on legend
res@pmLegendSide = "Top" ; Change location of
res@pmLegendParallelPosF = 0.8 ; move units right
res@pmLegendOrthogonalPosF = -0.3 ; move units down
res@pmLegendWidthF = 0.1 ; Change width and
res@pmLegendHeightF = 0.1 ; height of legend.
res@lgPerimOn = True ; turn off/on box around
res@lgLabelFontHeightF = 0.015 ; label font height
res@xyExplicitLegendLabels = (/"114k",name_2/) ; create explicit labels
res@tmYLMode = "Explicit"
res@tmYLMode = "Explicit"
res@tmYLValues = (/0,4,8,12,16,20,24/)
res@tmYLLabels = (/0,4,8,12,16,20,24/)
res@tmXBMode = "Explicit"
res@tmXBValues = (/0,20,40,60,80/)
res@tmXBLabels = (/0,20,40,60,80/)
res@tiMainString = "105-125E 40-50N"
plot = gsn_csm_xy(wks, x_1, y_1, res)
end do
;-------------------------------------------------------------------
end
|
-
|