Chapter Contents

Previous

Next
The G3GRID Procedure

Example 4: Using Spline Interpolation


Procedure features:
GRID statement options:
AXIS1=
AXIS2=
SPLINE
Data set: REFLIB.NUMS
Sample library member: GR30N04

[IMAGE]

[IMAGE]

This example demonstrates the default and spline interpolation methods when used by the GCONTOUR procedure to generate contour plots from the resulting output data sets.
 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 'Contour Plot after Default Interpolation';
footnote j=r 'GR30N04(a) ';
 Note about code
axis1 width=3;
 Note about code
proc g3grid data=reflib.nums out=numdef;
   grid y*x=z / axis1=-5 to 5 by .5
                axis2=-5 to 5 by .5;
run;
 Note about code
proc gcontour data=numdef;
   plot y*x=z / haxis=axis1 vaxis=axis1;
run;
 Note about code
title 'Contour Plot after Spline Interpolation';
footnote j=r 'GR30N04(b) ';
 Note about code
proc g3grid data=reflib.nums out=numspl;
   grid y*x=z / spline
                axis1=-5 to 5 by .5
                axis2=-5 to 5 by .5;
run;
 Note about code
proc gcontour data=numspl;
   plot y*x=z / haxis=axis1 vaxiss=axis1;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

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