爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4925|回复: 0

[作图] NCL填色图x轴坐标刻度重合

[复制链接]
发表于 2022-12-4 14:09:12 | 显示全部楼层 |阅读模式

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

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

x
求问各位大佬,我用gsn_csm_contour作图的时候为什么x轴出现了两个坐标刻度呢。。能不能把另一个灰色的刻度去掉呢,感觉看起来很别扭。。
程序如下:

    res                             = True
    res@gsnDraw                     = False      ; don't draw yet
    res@gsnFrame                    = False      ;先不添加图框
    res@gsnAddCyclic                = False      ;data is not cyclic

    res@gsnCenterString             = "SSHA,Obs"
    res@gsnRightString              = ""
    res@gsnLeftString               = ""
;=========================================================================
    res@cnFillOn                    = True         ; 打开颜色填充
    res@cnLinesOn                   = False        ; turn off contour lines
    res@cnLineLabelsOn              = False      ;turn off cn line labels
    res@cnInfoLabelOn               = False      ;去掉右下角contour的范围信息
    res@lbLabelBarOn                = True       ;打开colorbar
    res@lbOrientation        = "Vertical"         ;将colorbar垂直放置
    res@lbLabelOffsetF       = 0.02               ;显示间隔

    res@cnFillPalette               = "BlWhRe"                                          

    ;设置等值线范围和间距   
    res@cnLevelSelectionMode = "ManualLevels"     ; set manual contour levels
    res@cnMinLevelValF       =  -0.2            ; set min contour level
    res@cnMaxLevelValF       =  0.2             ; set max contour level
    res@cnLevelSpacingF      =  0.2/20.            ; 40等分

    res@gsnMaximize          = True ;最大化
;=========================================================================
;xy轴设置
    res@tiXAxisString               = "lontitude"
    res@tiYAxisString               = "year"
    res@tmXTOn                      = False
    res@tmXBMode                    = "Explicit"
    res@tmXBValues                  = (/140.25,160.25,180.25,200.25,220.25,240.25/)
    res@tmXBLabels                  = (/"140~S~o~N~E","160~S~o~N~E","180~S~o~N","160~S~o~N~W","140~S~o~N~W","120~S~o~N~W"/)
    ;res@gsnMajorLonSpacing            = 20. ;经度间隔

    res@tmYLOn                      = True
    res@tmYROn                      = False
    res@tmYLMode                    = "Explicit"
    res@tmYLValues                  = ispan(1,(yrLast-yrStrt+1)*12,36) ;3year一标注,标注在每年1月
    res@tmYLLabels                   = tostring(ispan(yrStrt, yrLast, 3)) ;
    ;print(num(ispan(0.5, 0.5+12*48, 36)))

    plot1 = gsn_csm_contour(wks, var_fil, res)
    ;plot1 = gsn_csm_hov(wks, var_fil, res)

    draw(plot1)
    frame(wks)

SSHA的哈默图

SSHA的哈默图
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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