爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 7511|回复: 15

[作图] 【求助】画中国地图时,相关系数等值线超过边界

[复制链接]

新浪微博达人勋

发表于 2016-1-8 19:58:53 | 显示全部楼层 |阅读模式

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

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

x
参照这个链接,http://bbs.06climate.com/forum.php?mod=viewthread&tid=11797画中国地图时,如下图,相关系数等值线如果设置成填色(res@cnFillOn= True)则未超过中国边界,如果等值线res@cnLinesOn = True,则会超出中国边界。怎样画等值线不超出中国边界呢?求高手帮忙解决,万分感谢!
corre-air.png


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

新浪微博达人勋

发表于 2016-1-8 20:12:50 | 显示全部楼层

回帖奖励 +1 金钱

res@cnFillDrawOrder="PreDraw"
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-1-8 20:16:37 | 显示全部楼层
Hurricane_Hu 发表于 2016-1-8 20:12
res@cnFillDrawOrder="PreDraw"

我的res里面有这句~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-1-8 20:17:11 | 显示全部楼层
附上我的resource:
res                         = True            
res@tiMainString            ="china_map"
res@gsnMaximize             = True
res@gsnDraw                 = False
res@gsnFrame                = False
res@tmXTOn=False
res@tmYROn=False
res@cnLevelSelectionMode =  "ExplicitLevels"
res@cnLevels            =(/-0.5,-0.4,-0.3,-0.2,-0.1,0,0.1,0.2,0.3,0.4,0.5/)   
;>--------------------------------------------<
;            set for the map
;>--------------------------------------------<
res@mpMinLatF               = 17.                        
res@mpMaxLatF               = 55.
res@mpMinLonF               = 72.
res@mpMaxLonF               = 136.

res@mpFillOn                = True
res@mpOutlineOn             = False  ; Use outlines from shapefile
res@cnFillDrawOrder         = "PreDraw"
res@mpDataBaseVersion       = "MediumRes"
res@mpDataSetName           = "Earth..4"
res@mpAreaMaskingOn         = True
res@mpMaskAreaSpecifiers    = (/"China","Taiwan","Disputed area between India and China","India:Arunachal Pradesh"/)
res@mpLandFillColor         = "white"
res@mpInlandWaterFillColor  = "white"
res@mpOceanFillColor        = "white"
res@mpOutlineBoundarySets   = "NoBoundaries"
;>--------------------------------------------<
; set for the plot

res@cnFillOn                = True               
res@cnLinesOn               = True
res@cnLineColor="red"
res@cnLineThicknessF        =2.0
res@cnLineLabelsOn          = True
res@cnLineLabelFormat       ="@^sg"
res@cnLineLabelInterval=1                       
res@gsnSpreadColors         = True         
res@lbLabelAutoStride       = True  
        
map=gsn_csm_contour_map(wks,r1,res)

;>============================================================<
;                      add China map
;>------------------------------------------------------------<
cnres           = True
cnres@china     = True       ;draw china map or not
cnres@river     = True       ;draw changjiang&huanghe or not
cnres@province  = True       ;draw province boundary or not
cnres@nanhai    = True       ;draw nanhai or not
cnres@diqu      = False       ; draw diqujie or not

chinamap = add_china_map(wks,map,cnres)
;>============================================================<

draw(map)
frame(wks)
end  
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-1-8 21:04:10 | 显示全部楼层
cnLineDrawOrder
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-1-8 21:07:08 | 显示全部楼层

恩恩,边界外的等值线去除了,但是边界外等值线上的标签还在,怎么去除呢?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-1-8 21:08:26 | 显示全部楼层
清柳雨菡 发表于 2016-1-8 21:07
恩恩,边界外的等值线去除了,但是边界外等值线上的标签还在,怎么去除呢?

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

新浪微博达人勋

 楼主| 发表于 2016-1-8 21:10:30 | 显示全部楼层
Hurricane_Hu 发表于 2016-1-8 21:08
cnLabelDrawOrder.................

哈哈,终于解决了,多谢多谢!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-1-8 21:11:37 | 显示全部楼层
清柳雨菡 发表于 2016-1-8 21:10
哈哈,终于解决了,多谢多谢!

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

新浪微博达人勋

 楼主| 发表于 2016-1-8 21:38:59 | 显示全部楼层

{:handshake:}
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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