Procedure features: |
G3GRID statement options:
|
GRID statement options:
|
|
Other features: |
|
Sample library member: |
GTGDEFIN
|
Scatter Plot of NUMS Data Set (gtgdefin)
![[A Scatter Plot Showing Data Before Interpolation]](images/gtgdefina.gif)
This
example demonstrates the default interpolation
method that is used by the GRID statement. The example first generates a scatter
plot of random data to show the concentration of data values before processing
the data set with the G3GRID procedure. The original data does not contain
enough combinations of x, y
and z values to:
The example then runs the G3GRID procedure to interpolate
additional x, y,
and z values. Because no interpolation method
is specified, the default interpolation method is used. The resulting output
data set is used as input to the G3D procedure, which generates the surface
plot shown in the following output.
Surface Plot using Interpolated Data Set (gtgdefin)
![[A Surface Plot Generated After Interpolation]](images/gtgdefinb.gif)
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
goptions reset=all border; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
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; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
title "Scatter Plot of NUMS Data Set"; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc g3d data=nums;
scatter y*x=z;
run;
quit; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc g3grid data=nums out=default;
grid y*x=z /
axis1=-5 to 5 by .5
axis2=-5 to 5 by .5;
run;
quit; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
title "Surface Plot using Interpolated Data Set"; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc g3d data=default;
plot y*x=z;
run;
quit; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.