BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
trekvana
Calcite | Level 5

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

You can use the SurfacePlotParm statement in GTL.  Program is attached.

SurfaceIntersection.png

View solution in original post

1 REPLY 1
Jay54
Meteorite | Level 14

You can use the SurfacePlotParm statement in GTL.  Program is attached.

SurfaceIntersection.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 855 views
  • 0 likes
  • 2 in conversation