begin ; ; Create some data for the contour plot. ; M=25 N=25 T = new((/N,M/),float) jspn = ispan(-M/2,M/2,1)^2 ispn = ispan(-N/2,N/2,1)^2 do i = 0, dimsizes(ispn)-1 T(i,:) = ispn(i) + jspn end do T = 100.0 - sqrt(8^2 * T) ; ; Create an X workstation. ; wid = create "wks" xWorkstationClass defaultapp end create ; ; Create a data object. ; dataid = create "data" scalarFieldClass defaultapp "sfDataArray" : T end create ; ; Create and draw a MapPlot object. ; mpid = create "MapPlot" mapPlotClass wid end create draw(mpid) ; Draw map plot. ; ; Retrieve the viewport coordinates used in the map plot so they ; can be used in the contour plot. ; getvalues mpid "vpXF" : xpos "vpYF" : ypos "vpWidthF" : width "vpHeightF" : height end getvalues ; ; Create a ContourPlot object using the same viewport coordinates as ; the map plot. ; cnid = create "ContourPlot" contourPlotClass wid "vpXF" : xpos "vpYF" : ypos "vpWidthF" : width "vpHeightF" : height "cnScalarFieldData" : dataid end create draw(cnid) ; Draw the contour plot. frame(wid) ; Advance frame. end