- 积分
- 103
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-11-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
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的哈默图
|