begin ; ; Create some data for the contour plot. ; N=25 T = new((/N,N/),float) jspn = ispan(-N/2,N/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 a ContourPlot object. ; cnid = create "ContourPlot" contourPlotClass wid "cnScalarFieldData" : dataid "cnFillOn" : True ; Turn on contour level fill. "cnMonoFillPattern" : False ; Indicate you want multiple fill patterns. ; ; Set cnFillPatterns and cnFillColors to various indexes representing ; fill patterns and colors. A fill pattern index of "0" is solid fill. ; If you don't want any fill for a particular contour level, set it ; to "-1," which means "transparent." ; "cnFillPatterns" : (/0, 2, 3, 0, 6, 8,10,-1, 9, 0,11,12,17,16/) "cnFillColors" : (/1,10,14, 8, 4, 2, 9, 1,12, 3, 1,13, 5, 7/) end create draw(cnid) ; Draw contour plot. frame(wid) ; Advance frame. end