begin ; ; Create an X Workstation. ; wks = create "wks" xWorkstationClass defaultapp end create ; ; Create four data objects. ; dataid = new(4,graphic) do i=0,3 dataid(i) = create "data" coordArraysClass defaultapp "caYArray" : i + sin(ispan(0,20,1)*3.14159/4.) end create end do ; ; Create an XY plot, passing the array of data objects just created. ; xy = create "xyplot" xyPlotClass wks "xyCoordData" : dataid end create ; ; Retrieve xyCoordDataSpec (it will be an array of four elements, one ; for each data object created). ; getvalues xy "xyCoordDataSpec" : dataspec end getvalues ; ; Set the desired resources using "setvalues" on the resource we ; just retrieved. ; do i=0,3 setvalues dataspec(i) "xyLineColor" : i+1 ; Change the line color for each line. "xyLineThicknessF" : i+1 ; Change the line thickness for each line. "xyDashPattern" : i ; Change the dash pattern for each line. end setvalues end do draw(xy) ; Draw the XY plot. frame(wks) ; Advance the frame. end