- 积分
- 754
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-1-13
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 男紫汗 于 2017-12-17 17:37 编辑
出图正常,只是添加的图例不显示,部分代码如下,请指点(前面漏了 res@gsnDraw = False
res@gsnFrame =False)
plot = gsn_csm_xy(wks,xtime(13:ntimes-13),c(:,13:36),res) ; Draw an XY plot with 1 curve.
lgres1=True
lgres1@lgLineColors=(/"red","green","blue","orange","brown","purple","red"/)
lgres1@lgMonoLineThickness=True
lgres1@lgLineThicknessF=2.5
lgres1@lgItemType="Lines"
lgres1@lgLabelFontHeightF=0.08
lgres1@lgPerimOn=False
;lgres1@lgLineLabelFontHeightF=0.05
lgres1@vpWidthF=0.08
lgres1@vpHeightF = 0.08
lgres1@lgDashIndexes=(/0,0,0,0,0,0,1/)
lg1=(/"P~B~IACR~","P~B~SACR~","-P~B~REVP~","-P~B~RAUT~","-P~B~RACW~","P~B~GFRG~","P~B~GACR*~F33~d~F21~4"/)
leg1=gsn_create_legend(wks, 7, lg1, lgres1)
amres1=True
amres1@amJust="TopLeft"
;amres1@amParallelPosF=-0.5
;amres1@amOrthogonalPosF=0.52
aaa1=gsn_add_annotation(plot, leg1, amres1)
lgres2=True
lgres2@lgLineColors=(/"green","blue","orange","brown","purple","black","black"/)
lgres2@lgMonoLineThickness=True
lgres2@lgLineThicknessF=2.5
lgres2@lgItemType="Lines"
lgres2@lgLabelFontHeightF=0.08
lgres2@lgPerimOn=False
;lgres1@lgLineLabelFontHeightF=0.05
lgres2@vpWidthF=0.08
lgres2@vpHeightF = 0.08
lgres2@lgDashIndexes=(/1,1,1,1,1,0,1/)
lg2=(/"P~B~GACRP*(1-~F33~d~F21~4)","-P~B~SACW~","P~B~SMLT~","P~B~GMLT~","-P~B~GACW~","Rain","Q~B~cmr~"/)
leg2=gsn_create_legend(wks, 7, lg2, lgres2)
amres2=True
amres2@amJust="TopRight"
;amres2@amParallelPosF=-0.5
;amres2@amOrthogonalPosF=0.52
aaa2=gsn_add_annotation(plot, leg2, amres2)
draw(plot)
frame(wks)
end
|
|