NCL有三个添加文本的接口:gsn_text(图形坐标)、gsn_text_ndc(页面坐标)和gsn_add_text。只有最后一个函数会将文本和图形结合在一起。例: add_T = "text here" x = 0.5 ; middle of x y = 0.85 ; towards top of page txres = True txres@txFontHeightF = 0.03 gsn_text_ndc(wks,plot,add_T,...
Otherwise, you can setthe cnFillColors or vcLevelColors to arrays of color indices or names.Run the following script and compare the color fills in the two frames:title = This is a titleCwith a carriage returntxres = TruetxrestxFontHeightF = 0.03gsn_text_ndc(wks,title,0.5,0.5,txres)...
2 打开数据,格式如下,保存为“typhoon.txt”NCl脚本如下;***; Load NCL scriptsload "$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";***beginfiTY = "./typhoon.txt"nrow...
wplot = gsn_csm_vector_map(wks,ddata1,vdata1,wres) ; create plot ddata1是插值后的风向,vdata1是插值后的风速 由于wplot要和之前的map叠加,使⽤overlayhas函数,最后在显⽰叠加后的map overlay(map,wplot)draw(map)⼆、地⾯⽓象要素天⽓分析图 改图为绘制样例,不是真实数据。1.各...
NCL绘图示例台风路径及风圈图-大气科学学报 NCL绘图⽰例台风路径及风圈图-⼤⽓科学学报 res@gsnFrame = False res@gsnDraw = False ; don't draw plot yet res@mpMinLatF = 5 ; zoom in on a subregion res@mpMaxLatF = 35 res@mpMinLonF = 110 res@mpMaxLonF = 150 ...
gsn_polygon_ndc(wks, xbox+j*hx, ybox-i*hy, gnres) ;hx,hy是单图高单图宽 end do end do ;---给图框加上文字--- txres = True ; text mods desired txres@txFontHeightF = 0.015 ; txres@txJust ="CenterCenter" ;--序号标注内容设置,也是2*2的字符串...
NCL绘图示例台风路径及风圈图-大气科学学报
load $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl load $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl begin in = addfile( “myfile.nc, “r “) t = in-T wks = gsn_open_wks( “ps,ce) gsn_define_colormap(wks,BlAqGrYeOrRe) res = True res@cnFillOn = True res@cnLines...
lnline5 = gsn_add_polyline(wks, map, (/88,88/), (/20,20.5/), lnres) lntext1 = gsn_add_text(wks, map, "0", 78, 22, txres) lntext1 = gsn_add_text(wks, map, "500", 83, 22, txres) lntext1 = gsn_add_text(wks, map, "1000", 88, 22, txres) ...
这样所有数据就保存到各个变量中啦!每个变量都是⼀个⼀维数组。⼆、将站点数据使⽤各种差值函数转换成格点数据。注意使⽤这些函数的时候要在⽂件头部包含contributed.ncl,即:load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"