- 积分
- 103
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-11-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我在用gsn_csm_hov函数画哈默图时,发现画出的图的填色区域与边框之间有一点空隙(如图所示),请问各位大佬,这是什么原因呀?
还有一个小问题,就是怎样才能让下方的经度坐标的最左和最右端也显示出来呢?(我用的数据的经度是从140.25°到239.73°,分辨率0.5°)
请各位不吝赐教,感激不尽!
画图部分的程序如下:
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@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 ;最大化
;=========================================================================
res@lbOrientation = "Vertical" ;将colorbar垂直放置
res@lbLabelOffsetF = 0.02
;=========================================================================
;xy轴设置
res@tiXAxisString = "lontitude"
res@tiYAxisString = "year"
res@tmXBOn = True
res@tmXTOn = False
res@tmXBMode = "Explicit"
res@gsnMajorLonSpacing = 15. ;经度间隔
res@tmYLOn = True
res@tmYROn = False
res@tmYLMode = "Explicit"
res@tmYLValues = ispan(0,(2008-1960+1)*12-1,36) ;3年一标注,标注在每年1月
res@tmYLLabels = tostring(ispan(1960, 2008, 3)) ;
plot1 = gsn_csm_hov(wks, var_fil, res)
draw(plot1)
frame(wks)
|
-
哈默图
|