Chapter Contents

Previous

Next
The G3D Procedure

Example 1: Generating a Default Surface Plot


Procedure features:
PLOT statement
Sample library member: GR29N01

[IMAGE]

This example shows a surface plot that reveals the shape of a generated data set named HAT. The PLOT statement in this example relies entirely on procedure defaults. The axes are scaled to include all data values and are labeled with the names of the axes variables. The axes major tick marks are divided into three even intervals, and the horizontal plane is rotated 70° around the z axis and tilted 70° toward you. The plot is displayed with the colors that the GOPTIONS statement defines for the colors list.
 Note about code
libname reflib 'SAS-data-library';
goptions reset=global gunit=pct border cback=white
         colors=(black blue green red)
         ftext=swiss ftitle=swissb htitle=6 htext=4;
 Note about code
data reflib.hat;
   do x=-5 to 5 by 0.25;
      do y=-5 to 5 by 0.25;
         z=sin(sqrt(x*x+y*y));
         output;
      end;
   end;
run;
 Note about code
title 'Surface Plot of HAT Data Set';
footnote j=r 'GR29N01 ';
 Note about code
proc g3d data=reflib.hat;
   plot y*x=z;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.