gsn_polymarker_ndc(wks, Labelbar_XF+LegendVpWidthF*0.34*0.87, Legend_YF, lgmarkres) end if gsn_polyline_ndc(wks, Line_XX, Line_YY, lglineres) gsn_text_ndc(wks,LegendNames(i_linelegend), Labelbar_XF+LegendVpWidthF*0.42, Legend_YF,lgtextres) end do draw(plot_yaxes) frame(wks) ...
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)...
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 ...
NCL绘图示例台风路径及风圈图-大气科学学报
txres=Ngl.Resources()txres.txFontHeightF=0.012Ngl.text_ndc(wks,f.variables["t"].attributes['long_name'],0.14,0.82,txres)Ngl.text_ndc(wks,f.variables["t"].attributes['units'],0.95,0.82,txres)#--advance the frame Ngl.frame(wks)Ngl.end() ...
mkres@gsMarkerThicknessF = 1.5 ;标识的粗细 txres = True txres@txFontHeightF = 0.02 do i = 0,5 ; 绘制每个等级的图例,它由标识和文本构成 mkres@gsMarkerColor = toint(floor(ncol/nbin*(i+1)-1)) gsn_polymarker_ndc(wks,x_ndc(i),y_ndc(i),mkres) gsn_text_ndc(wks,t_ndc(i),...
NCL有三个添加文本的接口:gsn_text(图形坐标)、gsn_text_ndc(页面坐标)和gsn_add_text。只有最后一个函数会将文本和图形结合在一起。例: 二十一、X-Y坐标 下面的例子使用了接口gsn_csm_xy创建一个X-Y图形: f = addfile(\“x11\True res@tiMainString = \如果你要在一副图形上画多条线,你需要将每条线...
(wks,BlAqGrYeOrRe) res = True res@cnFillOn = True res@cnLinesOn = False res@cnLevelSpacingF = 0.5 res@gsnSpreadColors = True res@lbAutoLabelStride = True plot = gsn_csm_contour_map_ce(wks,t,res) end 二、高水平图形接口 2.1 gsn 图形接口 一般的 gsn 接口可以创建一般的 x-y 坐标,...
gsn_text_ndc 的 第一参数是从前一个对 gsn_open_wks 调用返回的工作站变量,第二个参数是要 绘制的字符串,接下来的两个参数是在 NDC 坐标中文字的 X 和 Y 的位置,最 后一个参数是一个逻辑值表明你是否设置了任何的 resources 。文本字符串将以 你指定的 X 和 Y 的位置为 围绕,除非你设置了其他的 ...
nclscripts/csm/contributed.ncl ;加载ncl文件 begin wks = gsn_open_wks(“ps”,“china”) ;创建一个ps的工作空 ;间,并取名为china gsn_define_colormap(wks,WhViBlGrYeOrRe) ;为wks定义默认的colormap,在画地图的时候使用 cmap = gsn_retrieve_colormap(wks) ;为wks检索colormap 返回float类型的RGB...