load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ;---Generate dummy u, v arrays npts = 10 ii = ispan(10,10*npts,10) u = conform_dims((/npts,npts/),ii,0) v = conform_dims((/npts,npts/),ii,1) ;---Open workstation wtype = "png" wtype@wkHeight = 2500 wtype@wkWidth = 2500 wks = gsn_open_wks(wtype,"vector1a_with_annotations") ;---Set some resources res = True res@gsnMaximize = True res@gsnFrame = False res@trXMinF = -1 res@trXMaxF = npts res@trYMinF = -1 res@trYMaxF = npts res@vcLineArrowThicknessF = 3. res@vcVectorDrawOrder = "PreDraw" res@vcLineArrowColor = "gray35" vector = gsn_csm_vector(wks,u,v,res) ;---Add some text and markers mkres = True mkres@gsMarkerIndex = 17 mkres@gsMarkerSizeF = 0.02 mkres@gsMarkerColor = "NavyBlue" txres = True txres@txFontHeightF = 0.01 txres@txFontColor = "Brown3" do i=0,npts-1 do j=0,npts-1 gsn_text(wks,vector,"("+u(i,j)+","+v(i,j)+")",j,i-0.4,txres) gsn_polymarker(wks,vector,j,i,mkres) end do end do frame(wks) end