O'Reilly logo

SAS/GRAPH: Beyond the Basics by Robert Allison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EXAMPLE 6  Overlay G3D Surfaces

Purpose: Overlay multiple 3D surfaces in the same plot.

One of the limitations of the SAS/GRAPH PROC G3D surface plot is that it allows you to plot only a single surface. A colleague in grad school had a need to plot two surfaces on the same set of axes, and I devised a way to do that using PROC GREPLAY. The technique is fairly straightforward, but there are a few caveats.

The data is not really important (you’ll have your own data); therefore, I use the following data, which I borrowed from a SAS/GRAPH example:

data raw_data;
input X Y Z;
datalines;
-1.0 -1.0   15.5
 -.5 -1.0   18.6
  .0 -1.0   19.6
  .5 -1.0   18.5
 1.0 -1.0   15.8
-1.0  -.5   10.9
 -.5  -.5   14.8
  .0  -.5   16.5
  .5  -.5   14.9
 1.0  -.5   10.9 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required