begin ; ; Generate streamline data arrays. ; M=30 N=30 PI=3.14159 U = 10.0 * sin(onedtond((2.0 * PI / N) * ispan(0,N-1,1),(/M,N/))) V = 10.0 * cos(onedtond((2.0 * PI / M) * ispan(0,M-1,1),(/N,M/))) ; ; Create an X workstation. ; wid = create "wks" xWorkstationClass defaultapp end create ; ; Create a data object. ; vfid = create "data" vectorFieldClass defaultapp "vfUDataArray" : U "vfVDataArray" : V "vfXCStartV" : -90.0 ; minimum longitude value for overlay "vfXCEndV" : 90.0 ; maximum longitude value for overlay "vfYCStartV" : -45.0 ; minimum latitude value for overlay "vfYCEndV" : 45.0 ; maximum latitude value for overlay end create ; ; Create a StreamlinePlot object. ; stid = create "StreamlinePlot" streamlinePlotClass wid "stVectorFieldData" : vfid end create ; ; Create the default MapPlot object. ; mpid = create "MapPlot" mapPlotClass wid end create overlay(mpid,stid) ; Overlay streamline plot on map plot. draw(mpid) ; Draw map plot (streamline plot will be drawn too). frame(wid) ; Advance frame. end