Chapter Contents

Previous

Next
The G3GRID Procedure

Example 3: Using Partial Spline Interpolation


Procedure features:
GRID statement options:
NEAR
PARTIAL
Data set: REFLIB.NUMS
Sample library member: GR30N03

[IMAGE]

This example specifies a partial spline interpolation method on the GRID statement, using eight nearest neighbors for computing the estimates of the first and second derivatives. The output data set, when used in PROC G3D, generates a smoother surface plot than the surface plot that results from the default interpolation shown in Example 1, but not as smooth as the surface plot that results from the spline interpolation shown in Example 2.
 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=3;
 Note about code
title 'Surface Plot after Partial Interpolation';
footnote j=r 'GR30N03 ';
 Note about code
proc g3grid data=reflib.nums out=partial;
   grid y*x=z / partial
                near=8
                axis1=-5 to 5 by .5
                axis2=-5 to 5 by .5;
run;
 Note about code
proc g3d data=partial;
   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.