*************** TEMPLATES ********************** ** From the ST512 home page, lab 6 demo 5 ** ** Run graph1.sas first ** **************************************************; goptions reset=all; proc greplay nofs; igout=work.gseg; delete _all_; ** clear out the existing graphics catalog ***; goptions lfactor=6; ** put plot statements here ****; data quads; do w = -1 to 1 by .1; do v = -1 to 2 by .1; Y1 = v*v - w*w + 2; Y2 = v*v + w*w + 1; Y3 = 6- v*v - w*w; y4 = 6 - v*v - .2*w*w; output; end; end; proc g3d; plot v*w=y1; plot v*w=y2; plot v*w=y3; plot v*w=y4; data quads; do x = -1 to 1 by .1; do y = -1 to 1 by .1; V = (x+y)/sqrt(2); W = (x-y)/sqrt(2); Y1 = v*v - .8*w*w + 2; Y2 = v*v + .8*w*w + 1; Y3 = 6- v*v - w*w; y4 = 6 - v*v - .2*w*w; output; end; end; proc g3d; plot x*y=y1; plot x*y=y2; plot x*y=y3; plot x*y=y4; proc glm; model y1 y2 y3 y4 = y x y*y x*x x*y; proc greplay tc=tempcat nofs igout=work.gseg; tdef eight des='Eight panels' 1/ llx = 0 lly = 76 ulx = 0 uly = 98 urx = 48 ury = 98 lrx = 48 lry = 76 2/llx = 52 lly = 76 ulx = 52 uly = 98 urx =100 ury = 98 lrx =100 lry = 76 3/llx = 0 lly = 52 ulx = 0 uly = 74 urx = 48 ury = 74 lrx = 48 lry = 52 4/llx = 52 lly = 52 ulx = 52 uly = 74 urx =100 ury = 74 lrx =100 lry = 52 5/llx = 0 lly = 26 ulx = 0 uly = 48 urx = 48 ury = 48 lrx = 48 lry = 26 6/llx = 52 lly = 26 ulx = 52 uly = 48 urx =100 ury = 48 lrx =100 lry = 26 7/llx = 0 lly = 2 ulx = 0 uly = 24 urx = 48 ury = 24 lrx = 48 lry = 2 8/llx = 52 lly = 2 ulx = 52 uly = 24 urx =100 ury = 24 lrx =100 lry = 2 ; template = eight; treplay 1:g3d 2:g3d1 3:g3d2 4:g3d3 5:g3d4 6:g3d5 7:g3d6 8:g3d7; run ; /* goptions reset=all; proc greplay nofs; igout=work.gseg; delete _all_; */; proc g3d data=one; scatter X*Y=Z; plot X*Y=Z; proc gslide; title " "; note j=center h=2 C=red "Overlaid 3D Plots"; note h=8 " " ; note h=2 C=blue j=center "*** ***"; proc greplay tc=tempcat nofs igout=work.gseg; tdef overlay des='Overlay panels' 1/ llx = 2 lly = 2 ulx = 2 uly = 98 urx = 98 ury = 98 lrx = 98 lry = 2 2/llx = 5 lly = 5 ulx = 5 uly = 85 urx =85 ury = 85 lrx =85 lry = 5 3/llx = 5 lly = 5 ulx = 5 uly = 85 urx =85 ury = 85 lrx =85 lry = 5 ; template = overlay; treplay 1:gslide 2:g3d 3:g3d1; run;