- 积分
- 5451
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-11-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 何源 于 2019-7-27 16:13 编辑
请问,有朋友遇见过,NCL折线图中,在画参考线之后,出现参考线遮蔽部分线段的问题嘛?是如何解决的呢?谢谢作图代码如下:
;---------------------Draw the plot----------------
res=True
res@gsnDraw=False
res@gsnFrame=False
res@vpHeightF=0.3
res@vpWidthF=0.7
res@trXMaxF=2011
res@trXMinF=1965
res@tiXAxisString="Year"
res@tiYAxisFontHeightF=0.018
res@tiXAxisFontHeightF=0.018
res@gsnYRefLine=0
res@gsnYRefLineThicknessF=1.5
res@tmYROn=False
res@tmXTOn=False
res@tmXBMode="Manual"
res@tmXBLabels=year
res@xyLineColor="red"
res@xyLineThicknessF=2.0
res@xyMarkLineMode="MarkLines"
res@xyMarker=1
res@xyMarkerSizeF=0.025
res@gsnYRefLine=0
res@gsnYRefLineThicknesse=1.5
res@xyMarkerColor="black"
wks=gsn_open_wks("eps", get_script_prefix_name())
plot=new(2,graphic)
do i=0,1
if(i.eq.0)then
data=ipr
res1=res
res1@tiYAxisString="Precipitation anomaly/mm"
res1@xyLineColor="blue"
res1@xyMarkerColor="blue"
plot(i)=gsn_csm_xy(wks,year,data,res1)
end if
if(i.eq.1)then
data=itm
res2=res
res2@xyMarkerColor="red"
res2@tiYAxisString="Temperature anomaly/~S~o~N~C"
plot(i)=gsn_csm_xy(wks,year,data,res2)
end if
delete(data)
end do
resP = True ; modify the panel plot
resP@gsnFrame = False ; don't advance panel plot
resP@gsnPanelLabelBar = False ; add common colorbar
resP@gsnPanelBottom = 0.05
resP@lbOrientation="Vertical"
resP@pmLabelBarWidthF=0.04
resP@pmLabelBarHeightF=0.6
resP@gsnPanelFigureStrings=(/"(a)","(b)"/)
resP@gsnPanelFigureStringsFontHeightF=0.01
resP@gsnPanelFigureStringsPerimOn=False
resP@amJust="TopLeft"
gsn_panel(wks,plot,(/2,1/),resP) ; now draw as one plot
frame(wks)
|
-
|