爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 665|回复: 2

labelbar为什么没有数值显示?

[复制链接]

新浪微博达人勋

发表于 2024-5-19 13:56:53 | 显示全部楼层 |阅读模式
3金钱
  
代码如下:

    t1 = wrf_user_getvar(a,"T2",itime)   ; T2 in Kelvin
      slp = wrf_user_getvar(a,"slp",itime)   ; slp
      t2 = wrf_user_getvar(b,"T2",itime)   ; T2 in Kelvin
      t = t1-t2
      ; Generate contours.
        t_res =res
        t_res@cnFillOn = True         
        t_res@lbLabelBarOn = False       ; Turn off individual label bars so we can
        t_res@cnFillPalette        = "BlueWhiteOrangeRed"   ; set color map
        t_res@cnLinesOn            = False               ; turn off contour lines
        t_res@cnLevelSelectionMode = "ManualLevels"      ; manually set cn levels
        t_res@cnMinLevelValF       = -2.                 ; min level
        t_res@cnMaxLevelValF       =  2.                 ; max level
        t_res@cnLevelSpacingF      = .1                  ; contour level spacing
        contour = wrf_contour(a,wks,t,t_res)
        slp_res = res
        slp_res@ContourParameters =(/ 990., 1026., 2. /)
        slp_res@cnInfoLabelFontHeightF = 0.037
        con_slp = wrf_contour(a,wks,slp,slp_res)
  为什么ncl绘制出来labelbar显示为默认的这些label_0.......,怎么才能改成从-2~2的间隔0.1的色标?感谢大佬们。



图片1.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2024-5-20 08:52:05 来自手机 | 显示全部楼层
colorbarΧΧ
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2024-5-22 16:51:11 | 显示全部楼层
这种情况可以使用t_res@cnLevelSelectionMode = "ExplicitLevels" ,这样就可以手动将labelbar上的注释调成自己想要的字符了。还有一种办法就是直接在adobe illustrator里面进行图片编辑。
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

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

本版积分规则

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

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

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