爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6551|回复: 1

gsn_csm_vector_scalar函数画风廓线无法显示纵坐标

[复制链接]

新浪微博达人勋

发表于 2020-10-9 16:53:19 | 显示全部楼层 |阅读模式

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

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

x
请问各位用gsn_csm_vector_scalar函数画风廓线图的时候有出现过纵坐标画不出的情况吗?我的纵坐标是自己设置的,如果使用默认设置就可以画出,但是用explicit就不行了,请问各位有遇到过这种问题吗?绘图部分的设置如下:
res                = True                    
  res@gsnDraw        = False          ; do not draw
  res@gsnFrame       = False          ; do not advance the frame
  res@tiMainString   = "Wind Profile" ; add title
  res@vcGlyphStyle   = "WindBarb"     ; select wind barbs
  res@vcRefLengthF   = 0.045          ; define length of vec ref
  res@vcRefAnnoOn    = False          ; turn off ref wind barb
  res@trYReverse     = True           ; reverse the Y-axis
  res@vcMonoWindBarbColor     = False            ; color barbs by scalar
  res@lbOrientation           = "vertical"       ; vertical labelbar
  ; res@vcLevelSelectionMode    = "ExplicitLevels" ; will explicitly set the levels
  res@vcWindBarbLineThicknessF= 1.5              ; set the wind barb thickness
  ; res@vcLevels                = ispan(5,65,5)    ; set the levels
  ; res@vcLevelColors           = (/20,30,40,45,50,55,60,65,70,75,80,85,90,95/)   ; set the colors associated with the wind speed

  res@tmXTOn          = False
  res@tmYROn          = False
  res@tmYLOn          = True
  res@tmYLMode        = "Explicit"
  ; res@tmYLValues      = (/50.,100.,150.,200.,250.,300.,350.,400.,450.,500.,550.,600.,650.,700.,750.,800.,850.,900.,950.,1000./)
  res@tmYLValues      = ispan(50,1000,50)
  res@tmYLLabels      = ""+res@tmYLValues
  ; res@trYMinF         = 50
  ; res@trYMaxF         = 1000
  res@tiYAxisString   = "Pressure(hPa)"
  res@tiXAxisString   = "wind(A-B)(m/s)"
  res@tmXBMode        = "Explicit"
  res@tmXBValues      = ispan(0,3,1)
  res@tmXBLabels      = (/"00Z","06Z","12Z","18Z"/)

  res@vcMapDirection = False      ; needed to disassociate the map from the vectors
  res@gsnAddCyclic = False              ; data is not cyclic
  res@gsnLeftString = ""
  plot = gsn_csm_vector_scalar(wks,u,v,spd,res)

  getvalues plot                        ; get the X/Y axis min/max for use in the loglin plot
    "trXMinF"    : trxmin
    "trXMaxF"    : trxmax
    "trYMinF"    : trymin
    "trYMaxF"    : trymax
  end getvalues

  loglin = create "logling" logLinPlotClass wks     ; draw a loglin plot, with expanded X/Y axis
    "trXMinF"        : trxmin-1
    "trXMaxF"        : trxmax+1
    "trYMinF"        : trymin
    "trYMaxF"        : trymax+1
    "trYReverse"     : True
    "vpXF"           : .15            ; set the X-axis NDC starting point
    "vpYF"           : .8             ; set the Y-axis NDC starting point
    "vpWidthF"       : .7             ; set the width of the plot in NDC units
    "vpHeightF"      : .45            ; set the height of the plot in NDC units
  end create
  overlay(loglin,plot)              ; overlay plot with the loglin plot
  draw(loglin)                      ; draw the plot
  frame(wks)                        ; advance the frame

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

新浪微博达人勋

发表于 2023-12-6 12:46:48 | 显示全部楼层
我也遇到了,请问如何解决的呀
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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