- 积分
- 2979
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-3-17
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
大家好,我用ncl画了一个马赛克图,如图一,值都是对的;
然后把 res@cnFillMode ="RasterFill" 注释掉,其他不变,出来的填色图图2与图1相差很多,值都不同,实在不知道问题在哪里,求助大家,谢谢。
脚本直接贴了画图部分,前面数据处理无误,算出来score(60,60),画score(60,60)的分布;
脚本如下:
图一 rasterfill
图2
;--------画肉质期X5 雨量分布----------;
wks=gsn_open_wks("png", "F:/data/product_CQ/HUAJIAO_2019/caishou/X6_prep_2019_larger")
;gsn_define_colormap(wks, "grads_rainbow")
res = True
res@gsnMaximize =True
res@gsnDraw =False
res@gsnFrame =False
res@gsnAddCyclic =False ; regional data, don't add pt
res@cnFillOn = True
res@cnLinesOn = True
res@cnLineLabelsOn = True
;res@cnFillMode ="RasterFill" 图2 只注释掉了这一行
res@cnLevelSelectionMode = "ExplicitLevels" ; set manual contour levels
res@cnLevels = (/0.6,0.8,1.0/) ; set min contour level
res@cnFillColors = (/"orange","yellow","blue","green"/) ; set max contour level
res@lbOrientation = "vertical"
res@mpMaxLatF =30
res@mpMinLatF =28.0333
res@mpMaxLonF =106.9667
res@mpMinLonF =105
res@tmXBMode ="Explicit"
res@tmXBValues =(/105,105.5,106.0,106.5,106.9/)
res@tmXBLabels =(/"105","105.5","106.0","106.5","106.9~S~o~N~E"/)
res@tmYLMode ="Explicit"
res@tmYLValues =(/28.1,28.5,29,29.5,30/)
res@tmYLLabels =(/"28.1","28.5","29","29.5","30~S~o~N~N"/)
res@mpDataBaseVersion = "MediumRes" ; use finer database
;---------setting---------------;
res@tmXBLabelDeltaF = -0.5 ;使其更靠近X轴
res@tmYLLabelDeltaF = -0.5
res@tmXBMajorLengthF = 0.01 ;刻度线长短
res@tmYLMajorLengthF = 0.01
res@tmXBMajorThicknessF = 5.0 ;刻度线粗细
res@tmYLMajorThicknessF = 5.0
res@tmXBMinorOn =False
res@tmYLMinorOn =False
res@tmXBLabelFontHeightF = 0.02 ;字体大小
res@tmYLLabelFontHeightF = 0.02
res@tmXBLabelFontThicknessF = 3
res@tmYLLabelFontThicknessF = 3
res@tmBorderThicknessF = 5.0
plot=gsn_csm_contour_map(wks, score, res)
lon_add=(/105.8167, 106.6334 ,106.6334, 105.8167, 105.8167/)
lat_add=(/28.4667, 28.4667, 29.4667, 29.4667, 28.4667 /)
;add 区域
lnres =True
lnres@gsLineColor ="red"
lnres@gsLineThicknessF=10.0
lnres@gsLineDashPattern =1
Polygon=gsn_add_polyline(wks,plot,lon_add,lat_add,lnres)
draw(plot)
frame(wks)
|
|