Sample 25602: Generating a default surface plot using PROC G3D
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 2, Chapter 29.
For additional information on the sample refer to this book.
/*+-------------------------------------------------------------+
| S A S S A M P L E L I B R A R Y |
| |
| NAME: GTDSURFA |
| TITLE: GTDSURFA-Generating a Default Surface Plot |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS GOPTIONS G3D |
| PROCS: G3D |
| DATA: INTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
+-------------------------------------------------------------+*/
/* Set the graphics environment */
goptions reset=all gunit=pct border cback=white
colors=(blue black green red)
ftext=swiss ftitle=swissb htitle=6 htext=3;
/* Create the data set WORK.HAT */
data 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;
/* Define title and footnote for plot */
title 'Surface Plot of HAT Data Set';
footnote j=r 'GTDSURFA ';
/* Show the plot */
proc g3d data=hat;
plot y*x=z;
run;
quit;

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.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> G3D Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Plots ==> Surface
|
| Date Modified: | 2005-09-22 03:03:14 |
| Date Created: | 2005-05-23 14:18:18 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |