- 积分
- 756
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-11-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 推开世界的门 于 2023-7-19 14:04 编辑
各位老师:
我想在折线图上添加一个文本,按照以下代码程序没有报错,但是图中也不显示,请问一下各位老师是什么原因,
res1 = True ; plot mods desired
res1@trYReverse =True
res1@vpHeightF=0.6 ;图表高度
res1@vpWidthF=0.3 ;图表宽度
res1@gsnMaximize = True
res1@gsnBoxMargin = 0.0
res1@tiMainFontHeightF= 0.02
res1@tiMainString = "" ; add title+
res1@trXMinF = 0
res1@trXMaxF = 11
res1@xyLineThicknesses=5
res1@xyLineColors="red"
res1@tmYLMode="Explicit"
res1@tmYLValues=(/700,750,800,850,900,950,1000/)
res1@tmYLLabels=(/"3000","2500","2000","1500","1000","500","0"/)
res1@tiXAxisString="Wind speed(m/s)"
res1@tiYAxisString="Height(m)"
res2 = True
res2@trYReverse =True
res2@xyLineThicknesses=5
res2@xyLineColors="blue"
res3 = True
res3@trYReverse =True
res3@xyLineThicknesses=5
res3@xyLineColors="black"
res4 = True
res4@trYReverse =True
res4@xyLineThicknesses=5
res4@xyLineColors="green"
plot1 = gsn_csm_xy (wks,s070100,y,res1) ; create plot
plot2 = gsn_csm_xy (wks,s070106,y,res2) ; create plot
plot3 = gsn_csm_xy (wks,s070112,y,res3) ; create plot
plot4 = gsn_csm_xy (wks,s070118,y,res4) ; create plot
overlay(plot1,plot2);覆盖
overlay(plot1,plot3)
overlay(plot1,plot4)
txres1 = True
txres1@txFontHeightF = 10 ; Set the font height
text1=gsn_add_text(wks,plot1,"a",0,0,txres1)
;overlay(plot1,text1)
draw(plot1);绘制
frame(wks);翻页
|
-
图1
|