Hello all -
So I am using this SAS code as an example of what I want to do. Pretty much it makes a surface plot with a plane at z=.20. However the surface and plane are trasparent and you cant really tell where the plane cuts the surface. Is there a way to make the plane and surface solid so that way the plane looks like it is cutting the surface?
data nums;
keep x y z;
do i=1 to 30;
x=10*ranuni(33)-5;
y=10*ranuni(35)-5;
z=sin(sqrt(x*x+y*y));
output;
end;
run;
proc g3grid data=nums out=default;
grid y*x=z / axis1=-5 to 5 by .5
axis2=-5 to 5 by .5;
run;
data anno;
/*Produce the plane*/
function='move'; xsys='1';ysys='1';zsys='2';line=1;size=1;
x=0; y=100; z=.20;output;
function='draw';
x=100; y=100; z=.20;output;
function='draw';
x=100; y=0; z=.20;output;
function='draw';
x=0; y=0; z=.20;output;
function='draw';
x=0; y=100; z=.20;output;
/*Produce the grid lines*/
function='move'; xsys='1';ysys='1';zsys='2';line=2;size=1;
x=0; y=25; z=.20;output;
function='draw';
x=100; y=25; z=.20;output;
function='move';
x=0; y=75; z=.20;output;
function='draw';
x=100; y=75; z=.20;output;
function='move';
x=25; y=100; z=.20;output;
function='draw';
x=25; y=0; z=.20;output;
function='move';
x=75; y=100; z=.20;output;
function='draw';
x=75; y=0; z=.20;output;
run;
proc g3d data=default;
plot y*x=z / anno=anno rotate=45 tilt=75;
run;
quit;
Thanks!
You can use the SurfacePlotParm statement in GTL. Program is attached.
You can use the SurfacePlotParm statement in GTL. Program is attached.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.