- 积分
- 2351
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-11-7
- 最后登录
- 1970-1-1
|
NCL
系统平台: |
cygwin |
问题截图: |
|
问题概况: |
我计算某年高度场较三十年平均场显著异常,所以想在该年高度异常的显著区域叠加斜线,现在我算出了t检验的概率prob,通过90%显著性检验即画出prob<0.1或prob>0.9的区域,我使用了ShadeLtGtContour函数,可是好像没有作用,求帮助看下是不是代码哪里出了问题,我是新手请见谅 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
2 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 我想养猫 于 2015-10-11 09:54 编辑
代码如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
begin
;!!!!!!!!!!!!!!!!!!!!!!!计算部分(跳过)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!画图部分!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
wks = gsn_open_wks("pdf","t5_2")
res1=True
res1@cnFillOn=True
res1@cnLinesOn=True
plot1=gsn_csm_contour_map(wks,prob(5,:,:),res1)
plot1=ShadeLtGtContour(plot1,0.1,8,0.9,8)
draw(plot1)
end
我查了官网,上面的代码是(传送门http://www.ncl.ucar.edu/Applications/Scripts/coneff_7.ncl):
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
wks = gsn_open_wks ("ps", "coneff" ) ; open workstation
res = True ; plot mods desired
res@gsnDraw = False ; do not draw
res@gsnFrame = False ; do not advance frame
res@cnLevelSpacingF = 4.0 ; contour level spacing
res@cnInfoLabelOn = False ; turn off contour label
plot = new(4,graphic) ; create a graphical array
; plot 3
res@gsnCenterString="< 0 shaded AND > 24 shaded"
plot(2) = gsn_csm_pres_hgt(wks, uzon, res )
plot(2) = ShadeLtGtContour(plot(2),0.1,7,25.5,8)
我模仿着写了代码,可是我画不示例那种斜线图,而且当我定义了 res@gsnDraw= False; res@gsnFrame = False 后出图是一张白纸。
|
|