请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 8989|回复: 1

[作图] 多张折线图绘制问题

[复制链接]

新浪微博达人勋

发表于 2021-8-16 16:00:43 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
各位大佬,如图一所示,我绘制的多条折线在同一张图上,但是最上面那两条折线如果绘制在一起就会多出一个图形框(红色椭圆框内),我想请问一下大家这个应该怎样去除,使整体如图二那样,整体只有一个框架,先谢谢大佬们了。代码如下:
plot = new(3,graphic)

res=True
res@vpWidthF              = 0.70       ; change aspect ratio of plot
res@vpHeightF             = 0.25
res@trYMinF               = 0.9
res@trYMaxF               = 3

res1=True
res1@vpWidthF              = 0.70       ; change aspect ratio of plot
res1@vpHeightF             = 0.25
res1@tiYAxisSide          = "Right"
res1@tfPolyDrawOrder       = "PreDraw"
res1@tmXBOn               = False
res1@tmXTOn               = False
res1@tmYLLabelsOn         = False
res1@tmYRLabelFontHeightF = 0.01      ; resize tick labels
res1@tmYRLabelsOn         = True

res2=True
res2@vpWidthF              = 0.70       ; change aspect ratio of plot
res2@vpHeightF             = 0.25

plot(0) = gsn_csm_xy2(wks,x,y1,y11,res,res)
plot(1) = gsn_csm_xy(wks,x,y2,res1)
plot(2) = gsn_csm_xy(wks,x,y3,res2)
attachres1                     = True
attachres1@gsnAttachPlotsXAxis = True  ;; attaches along x-axis
attachres1@gsnAttachBorderOn   = False ;; No border please
attachres2                     = True
attachres2@gsnAttachPlotsXAxis = True  ;; attaches along x-axis
attachres2@gsnAttachBorderOn   = False ;; No border please

attachid1  = gsn_attach_plots(plot(0),plot(1:2),attachres1,attachres2)

pres = False               ; No resources needed
maximize_output(wks,pres)  ; Maximize plot on page
end

图一

图一

图二

图二
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2021-12-9 09:54:50 | 显示全部楼层
大佬们,有没有了解这一部分的,自己顶一顶
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表