Sample 25598: Rotate a surface plot using PROC G3D
This example rotates the surface plot with PROC G3D and enhances its axes by adding reference lines and increasing the number of tick marks on the Y and Z axes. It also raises the plot above the horizontal X-Y plane.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This example rotates the surface plot with PROC G3D and enhances its axes by adding reference lines and increasing the number of tick marks on the Y and Z axes. It also raises the plot above the horizontal X-Y plane.
The graphics output in the Results tab was produced using SASĀ® 9.2. Submitting the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Set the graphics environment */
goptions reset=all border cback=white htitle=12pt;
/* Create the data set 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 a title for the graph */
title1 'Surface Plot of HAT Data Set';
/* Create the plot */
proc g3d data=hat;
plot y*x=z / grid
rotate=45
yticknum=5
zticknum=5
zmin=-3
zmax=1;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.

This example rotates the surface plot with PROC G3D and enhances its axes by adding reference lines and increasing the number of tick marks on the Y and Z axes. It also raises the plot above the horizontal X-Y plane.
| 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:03 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |