爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 7695|回复: 3

[作图] NCL画图右侧被吃了

[复制链接]
发表于 2019-11-12 19:35:56 | 显示全部楼层 |阅读模式

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

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

x
[url=]

                               
登录/注册后可看大图
[/url]


简单粗暴想知道问题出哪了,就是照着官网程序改的

---------------------------下面是具体的res-----------------------------
  wks = gsn_open_wks("png","Pre and T")                    ; send graphics to PNG file
;---Set common resources for all plots
  res                  = True
  res@vpWidthF         = 0.8            ; Change the aspect ratio, but
  res@vpHeightF        = 0.4            ; make plot as large as possible.
; Uncomment these if you don't want to draw the first two plots
; res@gsnDraw          = False
; res@gsnFrame         = False
;---Set resources for "left" variable
  resL                  = res
  resL@xyLineThicknesses      = 2.                  ; thicker line
  resL@trYMaxF           =   Premax                    ; axis max
  resL@trYMinF           =    Premin                    ; axis min
  resL@tiMainString      = " "                        ; title
  resL@xyLineColor      = "blue"                   ; line color
  resL@tiYAxisFontColor = resL@xyLineColor
; resL@tiYAxisString = t@long_name  ; axis string
;---Set resources for "right" variable
  resR                  = res                 
; resR@xyDashPatterns         = 1                   ; dashed line for 2nd
  resR@xyLineThicknesses      = 2                   ; thicker line
  resR@trYMaxF           = Tmax                    ; axis max
  resR@trYMinF           =  Tmin                   ; axis min
  resR@xyLineColor      = "red"                    ; line color
  resR@tiYAxisFontColor = resR@xyLineColor
; resR@tiYAxisString = p@long_name  ; axis string
  plot = gsn_csm_xy2(wks,year,Presum,Tavg,resL,resR)
;---Add the third line to the plots by using overlay
  res@xyLineColor       = resL@xyLineColor
; res@xyDashPattern     = 7                    ; different dash line but same color
  res@xyLineThicknessF  = 4
; res@tiMainString      = " "
  dum0 = gsn_add_polyline(wks,plot,year,PT_reg,res)
;
; Calling maximize_output is necessary, because the plot gets
; set back to the regular small size after the gsn_csm_xy2 call.
;
psres = True
  maximize_output(wks,psres)      ; Maximize new plots in frame.

end

Pre and T.000002.png
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2019-11-12 19:38:58 | 显示全部楼层
啊啊啊好像知道啦  删删删帖
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-11-12 19:41:51 | 显示全部楼层
啊啊啊还是没弄明白 为啥右边没有了!!! 只是把图弄窄了 然后右边就没了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2019-11-13 09:14:06 | 显示全部楼层
你把宽度设小点啊
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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