goptions reset=all; ** contains label supression trick: set label to backquote (unprintable) **; * filename grafout 'c:grafout\sundial5.ps'; goptions targetdevice=pslepsf vsize=6; **** Program = john4.sas ****; goptions lfactor=2 ftext=triplex htext=2; %macro orig; x=.021; y=.021; z=0; function="move"; output;function="draw"; size=2; %mend orig; %macro arrow; function="draw"; x1=x; y1=y; D=.35; L=.25; *** length and sharpness of arrowhead ***; z=.96*z;if x ne 0 then theta=atan(y/x); else theta = 2*atan(1); y=y1-L*sin(theta-D) ; x=x1-L*cos(theta-D); output; y=y1-L*sin(theta+D); x=x1-L*cos(theta+D); output; y=y1; x=x1; z=z/.96; output; %mend arrow; %macro wiggle ; x=x1; y=y1; z=z1; nn=30; size=1; function='move'; output; function='draw'; do i=1 to nn; z=z1 +.4*(up*(i/nn-.1*sin(2*pi*i/nn))); x=x1+.4*right*i/nn; output; end; if right < 0 then x=x+.1*right; else x=x+.4*right; function="label"; size=.6; position = "4"; %mend wiggle; %macro sub; size=2; output; size=1.3; position = "6"; z=z-.15; text = %mend sub; %macro subout; output; size=1; position = "4"; %mend subout; proc format; value noneg low-<-0.000001 =' '; value nolabel low-high = ' '; data anno; length function $ 8. text $ 12. color $ 8.; xsys='2'; ysys='2'; zsys='2'; when = 'a'; z=0; pi4=atan(1); pi=4*pi4; style='triplex'; ***********CIRCLES *************; x=1; y=0; function='move'; output; do i=1 to 200; y=1*sin(pi4*i/25); x=1*cos(pi4*i/25); function='draw'; color='black'; output; end; x=4; y=0; function='move'; output; do i=1 to 200; y=4*sin(pi4*i/25); x=4*cos(pi4*i/25); function='draw'; color='black'; if x<-1 or y<-1 then function='move'; output; end; ************************************ ***** labels and wiggly lines *****; color='black'; x1=2.06; y1=4; z1=0; up=1; right=1; %wiggle ; text= "Y"; size=2; x=x-.26; position="5"; output; * make your own hat on Y *; z=z + .15; x=x-.05; function='move'; output; function='draw'; z=z+.1; x=x+.04; output; x=x+.04; z=z-.1; output; x1=2.06; y1=4; z1=2.95; up=-1; %wiggle ; position="6"; x=x-.26; text= "Y=(2,4,3)"; size=2; output; x1=0.06; y1=4; z1=0.04; up=1; %wiggle; x=x-.15; text = "4X"; %sub "2"; %subout; x1=1.02; y1=1; z=.02; %wiggle; x=x-.24; text="W"; %sub "1"; %subout; x1=2.02; y1=0; z=.02; %wiggle; x=x-.12; text="2X"; %sub "1"; %subout; x1=.96; y1=2; z=.02; right=-1; %wiggle; text="W"; %sub "2"; %subout; x1=-.01; y1=1; %wiggle; text = "X"; %sub "2"; %subout; x1=1.01; y1=.02; right=1; %wiggle; x=x-.24; text = "X"; %sub "1"; %subout; ******************************************** ***********VECTORS**************************; color = 'black'; %orig; x=2; y=0; output; %arrow; %orig; x=0; y=4; output; %arrow; %orig; x=1; y=1; output;%arrow; %orig; x=1; y=2; output;%arrow; %orig; x=2; y=4; z=3; output; %arrow; z=0; output; color='gray70'; x=1; y=2; output; color='black'; %orig; x=1; y=0; z=0;output; %arrow; %orig; x=0; y=1; output; %arrow; ********************************************; data plot; x=-1; y=-1; z=0; output; x=4; y=4; z=3; output; proc g3d annotate=anno; * goptions controls font & height of text *; scatter x*y=z/ zticknum=4 xticknum=6 yticknum=6 rotate=10 caxis=black shape='point' color = 'white' noneedle; label Y="`" ; label X="`" ; label z = " ` "; format Y noneg.; format X noneg.; title ' '; /* proc greplay tc=tempcat nofs igout=work.gseg; tdef small des='Single small panel' 1/ llx = 0 lly = 0 ulx = 0 uly = 60 urx = 100 ury = 60 lrx = 100 lry = 0 ; template = small; treplay 1:g3d; replay template; */ run ;