Data visualization with SAS programming

Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

Reply
Contributor
Posts: 23

Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

Is there a way that we can specify x, y and z axis lengths in surface plot in proc g3grid ?

Can we control the scale, ticks and length of these axes?

 

My code is :

Data surface_data;
input longitude latitude yield;
datalines;
25 1 9.4375
25 2 9.505882353
25 3 9.431578947
25 4 9.363636364
25 5 9.445454545
25 6 9.457142857
25 7 9.48
25 8 9.231578947
25 9 9.171428571
25 10 8.92
25 11 8.866666667
25 12 .
25 13 .
24 1 9.323076923
24 2 9.3125
24 3 9.305263158
24 4 9.2
24 5 9.27826087
24 6 9.228571429
24 7 9.126315789
24 8 8.805263158
24 9 8.735714286
24 10 8.49
24 11 8.385714286
24 12 .
24 13 .
23 1 9.4
23 2 9.2
23 3 9.235294118
23 4 9.180952381
23 5 9.19047619
23 6 9.022222222
23 7 9.053333333
23 8 8.65625
23 9 8.558333333
23 10 8.366666667
23 11 8.328571429
23 12 8.02
23 13 .
22 1 9.05
22 2 9.030769231
22 3 9.033333333
22 4 9.133333333
22 5 9.2
22 6 9.188235294
22 7 9.242857143
22 8 8.976923077
22 9 8.75
22 10 8.585714286
22 11 8.45
22 12 .
22 13 .
21 1 9.036363636
21 2 9.0875
21 3 8.99
21 4 9.019047619
21 5 9.136842105
21 6 9.106666667
21 7 9.066666667
21 8 8.75
21 9 8.6125
21 10 8.516666667
21 11 8.34
21 12 .
21 13 .
20 1 9.357142857
20 2 9.477777778
20 3 9.257142857
20 4 9.2
20 5 9.258823529
20 6 9.216666667
20 7 8.9
20 8 8.18
20 9 .
20 10 .
20 11 .
20 12 .
20 13 .
19 1 9.941176471
19 2 9.92
19 3 9.59047619
19 4 9.5
19 5 9.357142857
19 6 9.288888889
19 7 .
19 8 .
19 9 .
19 10 .
19 11 .
19 12 .
19 13 .
18 1 9.98
18 2 10.10434783
18 3 9.92173913
18 4 9.831578947
18 5 9.728571429
18 6 9.955555556
18 7 .
18 8 .
18 9 .
18 10 .
18 11 .
18 12 .
18 13 .
17 1 10.08181818
17 2 10.216
17 3 10.04166667
17 4 10.02105263
17 5 9.828571429
17 6 9.955555556
17 7 .
17 8 .
17 9 .
17 10 .
17 11 .
17 12 .
17 13 .
16 1 10.36363636
16 2 10.49166667
16 3 10.42608696
16 4 10.44444444
16 5 10.04615385
16 6 10.2
16 7 .
16 8 .
16 9 .
16 10 .
16 11 .
16 12 .
16 13 .
15 1 10.42
15 2 10.4
15 3 10.37142857
15 4 10.475
15 5 10
15 6 10.08571429
15 7 .
15 8 .
15 9 .
15 10 .
15 11 .
15 12 .
15 13 .
14 1 10.03157895
14 2 10.03478261
14 3 10.15238095
14 4 10.2625
14 5 9.927272727
14 6 9.914285714
14 7 .
14 8 .
14 9 .
14 10 .
14 11 .
14 12 .
14 13 .
13 1 9.652631579
13 2 9.634782609
13 3 9.552380952
13 4 9.7875
13 5 9.290909091
13 6 9.228571429
13 7 .
13 8 .
13 9 .
13 10 .
13 11 .
13 12 .
13 13 .
12 1 9.747368421
12 2 9.747826087
12 3 9.761904762
12 4 9.9875
12 5 9.6
12 6 9.657142857
12 7 .
12 8 .
12 9 .
12 10 .
12 11 11.44
12 12 12.1
12 13 12.32
11 1 9.7
11 2 9.709090909
11 3 9.72
11 4 9.946666667
11 5 9.5
11 6 9.571428571
11 7 .
11 8 .
11 9 .
11 10 .
11 11 11.56666667
11 12 12.11428571
11 13 12.3
10 1 9.564705882
10 2 9.59
10 3 9.621052632
10 4 9.728571429
10 5 9.466666667
10 6 9.533333333
10 7 10.04
10 8 .
10 9 11.36666667
10 10 11.37142857
10 11 11.62
10 12 12
10 13 12.1
9 1 9.505882353
9 2 9.6
9 3 9.435294118
9 4 9.583333333
9 5 9.4
9 6 9.68
9 7 10.56666667
9 8 11.8
9 9 11.85
9 10 11.64
9 11 11.81428571
9 12 12
9 13 12.03333333
8 1 9.611111111
8 2 9.682352941
8 3 9.546666667
8 4 9.36
8 5 9.36
8 6 .
8 7 11
8 8 11.8
8 9 11.675
8 10 11.52727273
8 11 11.8
8 12 11.76
8 13 11.7
7 1 9.431578947
7 2 9.529411765
7 3 9.56
7 4 9.36
7 5 9.64
7 6 .
7 7 11.71428571
7 8 12.05714286
7 9 11.74545455
7 10 11.66666667
7 11 11.87368421
7 12 11.61111111
7 13 11.63529412
6 1 9.2
6 2 9.329411765
6 3 9.24
6 4 9.2
6 5 9.975
6 6 10.675
6 7 11.36363636
6 8 11.45
6 9 11.38666667
6 10 11.42105263
6 11 11.60909091
6 12 11.42857143
6 13 11.59
5 1 9.345454545
5 2 9.515789474
5 3 9.541176471
5 4 9.657142857
5 5 10.33333333
5 6 10.95
5 7 11.26666667
5 8 11.425
5 9 11.41111111
5 10 11.24761905
5 11 11.40869565
5 12 11.24545455
5 13 11.27619048
4 1 9.365217391
4 2 9.45
4 3 9.610526316
4 4 9.964705882
4 5 10.5
4 6 11.225
4 7 11.36842105
4 8 11.4
4 9 11.27368421
4 10 11.19047619
4 11 11.28181818
4 12 11.16190476
4 13 11.21818182
3 1 9.454545455
3 2 9.580952381
3 3 9.904761905
3 4 10.27
3 5 10.58947368
3 6 11.23
3 7 11.54545455
3 8 11.71428571
3 9 11.76190476
3 10 11.64347826
3 11 11.6
3 12 11.51428571
3 13 11.42857143
2 1 9.511111111
2 2 9.577777778
2 3 9.831578947
2 4 10.25263158
2 5 10.52
2 6 11.18095238
2 7 11.46956522
2 8 11.76363636
2 9 11.88181818
2 10 11.79130435
2 11 11.67272727
2 12 11.63157895
2 13 11.37777778
1 1 9.6
1 2 9.613333333
1 3 9.882352941
1 4 10.22352941
1 5 10.44705882
1 6 11.41111111
1 7 11.66
1 8 12.18888889
1 9 12.28421053
1 10 12.14
1 11 11.93333333
1 12 11.85333333
1 13 11.32857143

;

 

proc template;
define statgraph surface;


begingraph;
entrytitle 'Height Data';
rangeattrmap name="yield_map";

range 0-8 / rangecolormodel = (black );
range 8.02-8.88 / rangecolormodel=(darkred);
range 8.88-9.74/ rangecolormodel=(red);
range 9.74-10.6 / rangecolormodel=(yellow);
range 10.6 - 11.46 / rangecolormodel=(green);
range 11.46-12.32/ rangecolormodel=(darkgreen);
endrangeattrmap;
rangeattrvar attrvar=yieldvar var=yield attrmap="yield_map";
layout overlay3d / rotate=-70 tilt=35;
surfaceplotparm x=Latitude y=Longitude z=yield / surfacetype=fillgrid
colorresponse=yieldvar name="surface";
continuouslegend "surface";
endlayout;
endgraph;
end;
run;

ods graphics / width=640px height=640px;
proc g3grid data=surface_data out=gridded;
grid Longitude*Latitude=Yield / spline smooth=0.01
axis1=1 to 25 by 1
axis2=1 to 13 by 1;
run;
proc sort data=gridded; by Longitude Latitude; run;


proc sgrender data=gridded template=surface;

run;
quit;

 

PROC Star
Posts: 1,558

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

[ Edited ]

I would have expected this (in yellow) to work, but the viewmin and viewmax parameters don't seem to be enabled yet for the Z axis.

 

aaa1.PNG

 

proc g3d doesn't have this limitattion as you saw here.

You seem to have spent so much time on this that annotations may be what you need to have total flexibility. See this example.

Contributor
Posts: 23

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

Hi Chris,

 

Thank you for a response.

 

The proc g3D code that you mentioned

- does not maintain colours consistently (same values show different colours when with different data range)

- Cannot smoothen the data (does not generate a smooth surface)

Can we have these with proc g3d?

 

The example code that you mentioned does not produce a filled surface plot .

 

I would greatly appreciate your help in this regard,

Cheers,

PROC Star
Posts: 1,558

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

You can set the surface smoothness and the precision of the colour-matching as detailed as you want.

For example:

 

aaa1.PNG

Generated with:

 


proc g3grid data=SURFACE_DATA out=GRIDDED;
  grid LONGITUDE*LATITUDE=YIELD / spline smooth=0.01
  axis1=1 to 25 by .2
  axis2=1 to 13 by .2;
run;

data GRIDDED2;
  set GRIDDED
      GRIDDED (in=B);
  if B then do;
    LATITUDE+11;
    YIELD+11;  
  end;
run;


%macro set_colors(dsin,var);
  %local maxyield r g b;                                  
  proc sql noprint; select max(&var) into :maxyield from &dsin; quit;  
  goptions colors = (
  %do i=0 %to %scan(&maxyield,1);
    %let r=88;
    %let g=%sysfunc(putn(&i*6,hex2.));
    %let b=%sysfunc(putn(&i*4,hex2.));
    cx&r&g&b
  %end;
  );        
%mend;                        

axis1 order=(0 to 20 by 5);
axis2 order=(0 to 20 by 5);
axis3 order=(0 to 50 by 5);

%set_colors(GRIDDED,YIELD);
proc g3d data=GRIDDED ;
  where LATITUDE<11;
  plot LATITUDE*LONGITUDE=YIELD / style=4 contour=1 grid xytype=0
                                  xaxis=axis1 yaxis=axis2 zaxis=axis3;
run;

%set_colors(GRIDDED2,YIELD);
proc g3d data=GRIDDED2;
  plot LATITUDE*LONGITUDE=YIELD / style=4 contour=1 grid xytype=0
                                  xaxis=axis1 yaxis=axis2 zaxis=axis3;
run;

 

 

 

 

 

 

PROC Star
Posts: 1,558

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

Also see how the colours can be controlled at will in the example I pointed to.

 

         function='draw';


/* NCOL determines the range for the current value of YIELD. */
/* COLOR selects the color for that range. 		     */

         ncol=min(&nlevels,int(1+(yield-&yieldmin)/&step));
         color=scan(&colors,ncol);

 

Contributor
Posts: 23

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

Thanks Chris,

 

The spline smoothing works nicely now,

However, the colurs are still not consistent. (Even in your sample files, if we look at the colour at Z axis at 25,  it looks different in both graphs)

 

Is there a way that we can specify the colours based on values eg:

range 0-8 / rangecolormodel = (black );
range 8.02-8.88 / rangecolormodel=(darkred);
range 8.88-9.74/ rangecolormodel=(red);
range 9.74-10.6 / rangecolormodel=(yellow);
range 10.6 - 11.46 / rangecolormodel=(green);
range 11.46-12.32/ rangecolormodel=(darkgreen);

in the existing code rather than use 

 ncol=min(&nlevels,int(1+(yield-&yieldmin)/&step));
         color=scan(&colors,ncol);

which is cumbersome to implement

 

Regards,

 

PROC Star
Posts: 1,558

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

[ Edited ]

Proc g3d uses the goptions colors to draw gradients as far as I know. To get the exact solid-color bands you mention, you will have to annotate. Check the example to see if that's what you want.
You'll be so proud of your creation when it's finally done! Smiley Happy

Contributor
Posts: 23

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

Thanks ChrisNZ, 

for the idea of annotating.

1. However, even with annotation the scale changes the colours automatically:

 

eg Yield and Yield2 graphs generated using the following code:

 

/*-----------------------------------------------------------------*
* Name: surface.sas *
* Title: Draw color 3D surface plot with contours in X-Y plane *
Doc: http://www.datavis.ca/sasmac/surface.html
*-----------------------------------------------------------------*
* Original author: Russ Wolfinger *
* Author: Michael Friendly <friendly@yorku.ca> *
* Created: 26 Oct 2006 09:59:00 *
* Revised: 26 Oct 2006 09:59:00 *
* Version: 1.0 *
* *
*-----------------------------------------------------------------*/
/*=
=Description:

The SURFACE macro draws a 3D color-coded surface plot, showing a contour
plot in the X-Y plane. The result is most useful for smooth surfaces, e.g.,
for functional relations, Z=f(X,Y), bivariate density estimates computed
with PROC KDE, or with the result of PROC G3GRID.

==Method:

The surface and the contour plot are constructed using filled polygons
in Annotate datasets. The contour is identical to the surface, with the
Z coordinate set to the constant 'floor'.

=Usage:

The SURFACE macro is defined with keyword parameters. The X=, Y= and
Z= parameters are required.
The arguments may be listed within parentheses in any order, separated
by commas. For example:

%surface(x=temperature, y=pressure, z=yield);

==Parameters:

* DATA= The name of the input data set [Default: DATA=_LAST_]

* X= X variable for plot [Default: X=X]

* Y= Y variable for plot [Default: Y=Y]

* Z= Z variable for plot [Default: Z=Z]

* WHERE= Where clause to subset the data

* COLORS= Color scheme (HLS|HLSllss) or list of colors. COLORS=HLS generates
NLEVELS= colors varying in hue in the HLS color scheme Hhhh80FF.
COLORS=HLSllss, where llss are hex digits, generates HLS colors
with lightness ll and saturations ss. Otherwise, COLORS= is taken
as a blank separated list of SAS colors of length NLEVELS=.
[Default: COLORS=HLS]

* NLEVELS= Number of levels for color [Default: NLEVELS=12]

* TICKNUM= Number of tick marks on axes. Specify 1-3 values, for X, Y and Z. [Default: TICKNUM=5]

* DROP= Amount to drop contour plot beneath lowest z-value, in data units. [Default: DROP=1]

* TILT= G3D TILT= value(s): One or more numbers giving the number of degrees
to tilt the plot. [Default: TILT=75]

* ROTATE= G3D ROTATE= value(s): One or more numbers giving the number of degrees
to rotate the plot. [Default: ROTATE=40]

* FUZZ= Fuzz value for binning X, Y [Default: FUZZ=1E-6]

* OPTIONS= REVERSE and/or NOGRID. When COLORS=HLS, OPTIONS=REVERSE reverses the
assignment of colors to heights (Z= values) in the plot.

* ANNO= Additional input annotate data set

* OUTANNO= Output annotate data set used with G3D [Default: OUTANNO=SURFANNO]

* GOUT= The name of the graphics catalog [Default: GOUT=GSEG]

* NAME= The name of the graph in the graphic catalog [Default: NAME=SURFACE]

=Example:

*-- Generate bivariate normal data;
data bivar;
do i = 1 to 10000;
x = rannor(2140);
y = -x + 3* rannor(2140);
output;
end;
run;

*-- Do bivariate density estimation;
proc kde data=bivar out=kdeout;
var x y;
run;

%include macros(surface);
%surface(data=kdeout, x=x, y=y, z=density,
where=-3<x<3)


=*/

/*---
Title: Draw color 3D surface plot with contours in X-Y plane

macro to draw color surface plot with contours underneath,
code modified from Example 6 in SAS/GRAPH Examples book,
version 6, supported by Russ Wolfinger (sasrdw@unx.sas.com)---
---*/

%macro surface(
data=, /* name of input data set */
x=x, /* X variable for plot */
y=y, /* Y variable for plot */
z=z, /* Z variable for plot */
where=, /* where clause to subset the data */
colors=HLS, /* color scheme (HLS) or list of colors */
nlevels=12, /* number of levels for color */
ticknum=5, /* number of tick marks on axes */
drop=1, /* amount to drop contour plot beneath lowest z-value */
tilt=75, /* G3D TILT= value */
rotate=40, /* G3D ROTATE= value */
scatopt=, /* Any other options for the G3D SCATTER stmt */
fuzz=1e-6, /* fuzz value for binning X, Y */
options=, /* REVERSE and/or NOGRID */
anno=, /* additional input annotate data set */
outanno=surfanno, /* output annotate data set used with G3D */
gout=gseg, /* name of output graphic catalog */
name=surface /* name of graphic catalog entry */
);

/*---default data set---*/
%if %bquote(&data)= %then %let data=&syslast;

%local me; %let me=&sysmacroname;
%if (%length(&x)=0 or %length(&y)=0 or %length(&z)=0 )
%then %do;
%put ERROR: (&me) You must supply X=, Y= and Z= variable names;
%goto DONE;
%end;

%let options = %qupcase(&options);

%*-- Parse COLORS=HLS or COLORS=HLSllss;
%let colors = %qupcase(&colors);
%if %substr(&colors,1,3) = HLS %then %do;
%if %length(&colors) = 3
%then %let llss=80FF;
%else %let llss=%substr(&colors,4);
%let colors=HLS;
%end;

%let xtick = %scan(&ticknum &ticknum &ticknum, 1);
%let ytick = %scan(&ticknum &ticknum &ticknum, 2);
%let ztick = %scan(&ticknum &ticknum &ticknum, 3);

options nonotes;
/*---compute ranges for the three coordinates---*/
proc means data=&data noprint min max;
%if %length(&where) %then %do;
where &where;
%end;
var &x &y &z;
output out=_range
min=xmin ymin zmin
max=xmax ymax zmax;
run;

/*---set up macro variables for the ranges---*/
%local xmin xmax ymin ymax zmin zmax floor ceil zstep;
data _null_;
set _range;
call symput('xmin', put(xmin,best.));
call symput('xmax', put(xmax,best.));
call symput('ymin', put(ymin,best.));
call symput('ymax', put(ymax,best.));
call symput('zmin', put(zmin,best.));
call symput('zmax', put(zmax,best.));
zrange = zmax - zmin;
call symput('floor',put((zmin-(&drop)*zrange),best.));
call symput('ceil',put(zmax,best.));
call symput('zstep',put(zrange/&nlevels,best.));
run;

/*---determine step sizes for x and y---*/
proc sort data=&data out=_xgrid nodupkey;
by &x;
run;

data _xgrid;
set _xgrid;
keep &x xstep;
xstep = &x - lag(&x);
if (_n_ = 2) then do;
call symput('xstep',put(xstep,best.));
end;
run;

proc sort data=&data out=_ygrid nodupkey;
by &y;
run;

data _ygrid;
set _ygrid;
keep &y ystep;
ystep = &y - lag(&y);
if (_n_ = 2) then do;
call symput('ystep',put(ystep,best.));
end;
run;

data _null_;
set _ygrid nobs=count;
call symput('ny',put(count,best.));
run;

%*-- Nested macro for color computation;
%macro surcolor(arg);
%if &colors = HLS %then %do;
length hue $3;
%if %index(&options,REVERSE) %then %do;
deg = round((&arg)*320,2) + 120;
%end;
%else %do;
deg = 440 - round((&arg)*320,2);
%end;
hue = put(deg,$hex3.);
color = 'H'||hue||"&llss";
drop hue;
%end;
%else %do;
color = scan("&colors", ncol);
%end;
%mend;

/*---create annotate data set for legend---*/
data _legend;
length function color $ 8;
retain xsys ysys zsys '2';
drop legend ncol;
do legend = &zmin to (&zmax-&zstep) by &zstep;
x = &xmin;
y = &ymax;
z = legend;
function = 'poly';
style = 'solid';
ncol = min(&nlevels,int(1+(legend+(&zstep/2)-&zmin)/&zstep));
%surcolor(ncol/&nlevels);
/*
%if &colors=HLS %then %do;
%if %index(&options,REVERSE) %then %do;
deg = round((ncol/&nlevels)*320,2) + 120;
%end;
%else %do;
deg = 440 - round((ncol/&nlevels)*320,2);
%end;
hue = put(deg,$hex3.);
color = 'H'||hue||"&llss";
%end;
%else %do;
color = scan(&colors, ncol);
%end;
*/
output;
z = legend + &zstep;
function = 'polycont';
%if not %index(&options,NOGRID) %then %do;
color = 'black';
%end;
output;
x = &xmin + (&xmax-&xmin)*.05;
output;
z = legend;
output;
end;
run;

/*---create annotate data sets for plane and surface; sort by
the sum of coordinates so graphs will be drawn from
back to front---*/
data _zval;
set &data;
%if %length(&where) %then %do;
where &where;
%end;
x = &x;
y = &y;
z = &z;
keep x y z;
run;

proc sort data=_zval;
by x y;
run;

data _surface;
set &data;
%if %length(&where) %then %do;
where &where;
%end;
sum = (&x - &xmin)/&xstep + (&y - &ymin)/&ystep;
keep &x &y &z sum;
run;

proc sort data=_surface;
by descending sum;
run;

/*---draw 4-sided polygons counter-clockwise---*/
data _surface;
set _surface;
length function color $ 8;
retain xsys ysys zsys '2';
/* drop &x &y &z; */
x = &x;
y = &y;
if (abs(x-&xmin) < &fuzz*&xstep) or
(abs(y-&ymin) < &fuzz*&ystep) then delete;
function = 'poly';
style = 'solid';
%*surcolor;
ncol=min(&nlevels,int(1+(&z-&zmin+&fuzz*&zstep)/&zstep));
%surcolor((&z-&zmin+&fuzz*&zstep)/&zstep/&nlevels);

/*
%if &colors=HLS %then %do;
%if %index(&options,REVERSE) %then %do;
deg = round(((&z-&zmin+&fuzz*&zstep)/&zstep/&nlevels)*320,2) + 120;
%end;
%else %do;
deg = 440 - round(((&z-&zmin+&fuzz*&zstep)/&zstep/&nlevels)* 320,2);
%end;
hue = put(deg,$hex3.);
color = 'H'||hue||'80FF';
%end;
%else %do;
color = scan("&colors", ncol);
%end;
*/
when = 'A';
idx = &ny*(x-&xmin+&fuzz*&xstep)/(&xstep) +
(y-&ymin+&fuzz*&ystep)/(&ystep) + 1;
index = idx;
set _zval point=idx;
output;
function = 'polycont';
%if not %index(&options,NOGRID) %then %do;
color = 'black';
%end;
x = x - &xstep;
idx = &ny*(x-&xmin+&fuzz*&xstep)/(&xstep) +
(y-&ymin+&fuzz*&ystep)/(&ystep) + 1;
index = idx;
set _zval point=idx;
output;
y = y - &ystep;
idx = &ny*(x-&xmin+&fuzz*&xstep)/(&xstep) +
(y-&ymin+&fuzz*&ystep)/(&ystep) + 1;
index = idx;
set _zval point=idx;
output;
x = x + &xstep;
idx = &ny*(x-&xmin+&fuzz*&xstep)/(&xstep) +
(y-&ymin+&fuzz*&ystep)/(&ystep) + 1;
index = idx;
set _zval point=idx;
output;
run;

options notes;
data _plane;
set _surface;
z = &floor;
run;

/*---merge annotate data sets---*/
data &outanno;
set _legend _plane _surface &anno;
run;

/*---create input data set for PROC G3D---*/
data _plot;
&x = &xmin;
&y = &ymin;
&z = &floor;
output;
&x = &xmax;
&y = &ymax;
output;
run;

/*---draw the surface and contours---*/
proc g3d data=_plot gout=&gout ;
scatter &y*&x=&z /
%if %length(&rotate) %then %do;
rotate=&rotate %end;
%if %length(&tilt) %then %do;
tilt=&tilt %end;
xticknum=&xtick yticknum=&ytick zticknum=&ztick
shape='point'
zmin=&floor zmax=&ceil
annotate=&outanno &scatopt
name="&name" des="Surface plot of &y*&x=&z"
;
run;

*-- Clean up datasets no longer needed;
proc datasets nofs nolist nowarn library=work memtype=(data);
delete _xgrid _ygrid _zval _range _legend _plane _surface _plot;
run; quit;

%done:

%mend surface;

Data surface_data;
input longitude latitude yield yield2;
datalines;
10 1 5 3.75
10 2 5 3.75
10 3 5 3.75
10 4 5 3.75
10 5 5 3.75
10 6 0 0
10 7 0 0
10 8 0 0
10 9 0 0
9 1 5 3.75
9 2 5 3.75
9 3 5 3.75
9 4 5 3.75
9 5 5 3.75
9 6 0 0
9 7 0 0
9 8 0 0
9 9 0 0
8 1 5 3.75
8 2 5 3.75
8 3 5 3.75
8 4 5 3.75
8 5 5 3.75
8 6 0 0
8 7 0 0
8 8 0 0
8 9 0 0
7 1 5 3.75
7 2 5 3.75
7 3 5 3.75
7 4 5 3.75
7 5 5 3.75
7 6 0 0
7 7 0 0
7 8 0 0
7 9 0 0
6 1 5 3.75
6 2 5 3.75
6 3 5 3.75
6 4 5 3.75
6 5 5 3.75
6 6 0 0
6 7 0 0
6 8 0 0
6 9 0 0
5 1 10 7.5
5 2 10 7.5
5 3 10 7.5
5 4 10 7.5
5 5 10 7.5
5 6 20 15
5 7 20 15
5 8 20 15
5 9 20 15
4 1 10 7.5
4 2 10 7.5
4 3 10 7.5
4 4 10 7.5
4 5 10 7.5
4 6 20 15
4 7 20 15
4 8 20 15
4 9 20 15
3 1 10 7.5
3 2 10 7.5
3 3 10 7.5
3 4 10 7.5
3 5 10 7.5
3 6 20 15
3 7 20 15
3 8 20 15
3 9 20 15
2 1 10 7.5
2 2 10 7.5
2 3 10 7.5
2 4 10 7.5
2 5 10 7.5
2 6 20 15
2 7 20 15
2 8 20 15
2 9 20 15
1 1 10 7.5
1 2 10 7.5
1 3 10 7.5
1 4 10 7.5
1 5 10 7.5
1 6 20 15
1 7 20 15
1 8 20 15
1 9 20 15


;

%surface(data=surface_data,x=longitude,y=latitude,z=yield);
%surface(data=surface_data,x=longitude,y=latitude,z=yield2);
run;

 

 

 

 

 

2. Is there a way that we can use activeX for interactive surface plot or to produce multiple graphs wtih rotate values ranging from 0 to 360 at an increment of 5 degrees.

 

PROC Star
Posts: 1,558

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

I couldn't run your macro, but if you add a macro parameter:   maxzaxis=.

 

and a line of code at the end of the data step that defines the macro variables for the ranges:

  %if &maxzaxis ne . %then call symputx('ceil',&maxzaxis);

then the max value of your axis should always be as wanted.

 

The colour ranges are determined automatically by the macro. You need for force them (more parameters and more macro code) if you want to override the automatic colour ranges.

 

> Is there a way that we can use activeX for interactive surface plot or to produce multiple graphs with rotate values ranging from 0 to 360 at an increment of 5 degrees.

 

Call the macro repeatedly and change the values of  tilt=  and/or  rotate=   ?

 

 

 

 

 

 

PROC Star
Posts: 1,558

Re: Is it possible to specify x, y and z axis lengths in surface plot in proc g3grid

I modified slightly the example given to force colour ranges and a legend of one's choice.

The height of the Z axis can be set to any value as well.

 aaa1.PNG

aaa2.PNG

 

 


/* The G3D procedure only produces the axes */
/* for the plot. The Annotate facility adds */
/* the contours and legend.  The values of  */
/* the Z variable for the plot are divided  */
/* into ranges. Each range is represented   */
/* by a different color.         */

/* Set the graphics environment */
goptions reset=all border cback=white htitle=12pt; 

/* Create the RESULTS data set. RESULTS contains  */
/* the test results of a series of catalyst       */
/* experiments. TEMP contains the temperature of  */
/* the experiment (in Celsius). CATALYST contains */
/* the amount of the catalyst added (in grams).   */
/* YIELD records the yield of the experiment at a */
/* particular temperature and catalyst. Annotate  */
/* uses the values in this data set to draw the   */
/* lines on the surface and x-y plane so that the */
/* annotation represents true data values.    */


data results;
   input temp catalyst yield;
   datalines;
 60    0.000    6.83888
 60    0.002    7.15841
 60    0.004    7.43373
 60    0.006    7.66581
 60    0.008    7.85560
 60    0.010    8.00404
 60    0.012    8.11210
 60    0.014    8.18072
 60    0.016    8.21087
 60    0.018    8.20349
 60    0.020    8.15953
 60    0.022    8.07996
 60    0.024    7.96572
 60    0.026    7.81777
 60    0.028    7.63706
 60    0.030    7.42454
 60    0.032    7.18118
 60    0.034    6.90791
 60    0.036    6.60570
 60    0.038    6.27550
 60    0.040    5.91826
 60    0.042    5.53494
 60    0.044    5.12649
 60    0.046    4.69386
 60    0.048    4.23800
 60    0.050    3.75988
 60    0.052    3.26044
 60    0.054    2.74063
 60    0.056    2.20142
 60    0.058    1.64375
 60    0.060    1.06858
 60    0.062    0.47685
 60    0.064    0.00000
 60    0.066    0.00000
 60    0.068    0.00000
 60    0.070    0.00000
 60    0.072    0.00000
 60    0.074    0.00000
 60    0.076    0.00000
 60    0.078    0.00000
 60    0.080    0.00000
 62    0.000    7.15487
 62    0.002    7.48995
 62    0.004    7.78180
 62    0.006    8.03137
 62    0.008    8.23962
 62    0.010    8.40750
 62    0.012    8.53596
 62    0.014    8.62596
 62    0.016    8.67845
 62    0.018    8.69438
 62    0.020    8.67471
 62    0.022    8.62039
 62    0.024    8.53237
 62    0.026    8.41162
 62    0.028    8.25907
 62    0.030    8.07569
 62    0.032    7.86243
 62    0.034    7.62024
 62    0.036    7.35007
 62    0.038    7.05288
 62    0.040    6.72963
 62    0.042    6.38126
 62    0.044    6.00873
 62    0.046    5.61299
 62    0.048    5.19500
 62    0.050    4.75571
 62    0.052    4.29607
 62    0.054    3.81704
 62    0.056    3.31957
 62    0.058    2.80461
 62    0.060    2.27312
 62    0.062    1.72605
 62    0.064    1.16436
 62    0.066    0.58899
 62    0.068    0.00090
 62    0.070    0.00000
 62    0.072    0.00000
 62    0.074    0.00000
 62    0.076    0.00000
 62    0.078    0.00000
 62    0.080    0.00000
 64    0.000    7.38742
 64    0.002    7.73663
 64    0.004    8.04358
 64    0.006    8.30922
 64    0.008    8.53451
 64    0.010    8.72040
 64    0.012    8.86784
 64    0.014    8.97779
 64    0.016    9.05120
 64    0.018    9.08902
 64    0.020    9.09221
 64    0.022    9.06172
 64    0.024    8.99850
 64    0.026    8.90351
 64    0.028    8.77771
 64    0.030    8.62203
 64    0.032    8.43745
 64    0.034    8.22491
 64    0.036    7.98536
 64    0.038    7.71976
 64    0.040    7.42906
 64    0.042    7.11422
 64    0.044    6.77619
 64    0.046    6.41592
 64    0.048    6.03437
 64    0.050    5.63249
 64    0.052    5.21123
 64    0.054    4.77155
 64    0.056    4.31439
 64    0.058    3.84072
 64    0.060    3.35149
 64    0.062    2.84765
 64    0.064    2.33015
 64    0.066    1.79995
 64    0.068    1.25800
 64    0.070    0.70526
 64    0.072    0.14267
 64    0.074    0.00000
 64    0.076    0.00000
 64    0.078    0.00000
 64    0.080    0.00000
 66    0.000    7.54188
 66    0.002    7.90380
 66    0.004    8.22442
 66    0.006    8.50471
 66    0.008    8.74561
 66    0.010    8.94809
 66    0.012    9.11308
 66    0.014    9.24156
 66    0.016    9.33446
 66    0.018    9.39274
 66    0.020    9.41737
 66    0.022    9.40928
 66    0.024    9.36944
 66    0.026    9.29880
 66    0.028    9.19831
 66    0.030    9.06892
 66    0.032    8.91159
 66    0.034    8.72727
 66    0.036    8.51692
 66    0.038    8.28148
 66    0.040    8.02192
 66    0.042    7.73918
 66    0.044    7.43422
 66    0.046    7.10800
 66    0.048    6.76146
 66    0.050    6.39556
 66    0.052    6.01125
 66    0.054    5.60949
 66    0.056    5.19124
 66    0.058    4.75743
 66    0.060    4.30903
 66    0.062    3.84699
 66    0.064    3.37227
 66    0.066    2.88581
 66    0.068    2.38858
 66    0.070    1.88151
 66    0.072    1.36558
 66    0.074    0.84173
 66    0.076    0.31091
 66    0.078    0.00000
 66    0.080    0.00000
 68    0.000    7.62360
 68    0.002    7.99680
 68    0.004    8.32967
 68    0.006    8.62318
 68    0.008    8.87827
 68    0.010    9.09591
 68    0.012    9.27703
 68    0.014    9.42260
 68    0.016    9.53358
 68    0.018    9.61090
 68    0.020    9.65554
 68    0.022    9.66843
 68    0.024    9.65054
 68    0.026    9.60282
 68    0.028    9.52621
 68    0.030    9.42168
 68    0.032    9.29018
 68    0.034    9.13266
 68    0.036    8.95008
 68    0.038    8.74339
 68    0.040    8.51353
 68    0.042    8.26147
 68    0.044    7.98817
 68    0.046    7.69456
 68    0.048    7.38161
 68    0.050    7.05027
 68    0.052    6.70149
 68    0.054    6.33623
 68    0.056    5.95544
 68    0.058    5.56007
 68    0.060    5.15108
 68    0.062    4.72942
 68    0.064    4.29605
 68    0.066    3.85191
 68    0.068     3.3980
 68    0.070     2.9352
 68    0.072     2.4645
 68    0.074     1.9868
 68    0.076     1.5032
 68    0.078     1.0145
 68    0.080     0.5217
 70    0.000     7.6379
 70    0.002     8.0210
 70    0.004     8.3647
 70    0.006     8.6700
 70    0.008     8.9378
 70    0.010     9.1692
 70    0.012     9.3650
 70    0.014     9.5263
 70    0.016     9.6539
 70    0.018     9.7488
 70    0.020     9.8121
 70    0.022     9.8445
 70    0.024     9.8471
 70    0.026     9.8209
 70    0.028     9.7668
 70    0.030     9.6857
 70    0.032     9.5786
 70    0.034     9.4464
 70    0.036     9.2902
 70    0.038     9.1108
 70    0.040     8.9092
 70    0.042     8.6864
 70    0.044     8.4434
 70    0.046     8.1809
 70    0.048     7.9002
 70    0.050     7.6020
 70    0.052     7.2873
 70    0.054     6.9571
 70    0.056     6.6123
 70    0.058     6.2540
 70    0.060     5.8830
 70    0.062     5.5003
 70    0.064     5.1068
 70    0.066     4.7036
 70    0.068     4.2915
 70    0.070     3.8715
 70    0.072     3.4446
 70    0.074     3.0117
 70    0.076     2.5738
 70    0.078     2.1319
 70    0.080     1.6868
 72    0.000     7.5902
 72    0.002     7.9817
 72    0.004     8.3348
 72    0.006     8.6504
 72    0.008     8.9296
 72    0.010     9.1733
 72    0.012     9.3824
 72    0.014     9.5579
 72    0.016     9.7008
 72    0.018     9.8119
 72    0.020     9.8923
 72    0.022     9.9428
 72    0.024     9.9646
 72    0.026     9.9584
 72    0.028     9.9253
 72    0.030     9.8662
 72    0.032     9.7821
 72    0.034     9.6739
 72    0.036     9.5426
 72    0.038     9.3891
 72    0.040     9.2144
 72    0.042     9.0194
 72    0.044     8.8051
 72    0.046     8.5725
 72    0.048     8.3225
 72    0.050     8.0560
 72    0.052     7.7740
 72    0.054     7.4774
 72    0.056     7.1673
 72    0.058     6.8445
 72    0.060     6.5101
 72    0.062     6.1649
 72    0.064     5.8100
 72    0.066     5.4462
 72    0.068     5.0745
 72    0.070     4.6960
 72    0.072     4.3115
 72    0.074     3.9219
 72    0.076     3.5283
 72    0.078     3.1316
 72    0.080     2.7328
 74    0.000     7.4857
 74    0.002     7.8842
 74    0.004     8.2453
 74    0.006     8.5699
 74    0.008     8.8590
 74    0.010     9.1136
 74    0.012     9.3345
 74    0.014     9.5229
 74    0.016     9.6795
 74    0.018     9.8054
 74    0.020     9.9015
 74    0.022     9.9688
 74    0.024    10.0082
 74    0.026    10.0207
 74    0.028    10.0072
 74    0.030     9.9687
 74    0.032     9.9062
 74    0.034     9.8205
 74    0.036     9.7127
 74    0.038     9.5836
 74    0.040     9.4344
 74    0.042     9.2658
 74    0.044     9.0789
 74    0.046     8.8746
 74    0.048     8.6538
 74    0.050     8.4176
 74    0.052     8.1669
 74    0.054     7.9026
 74    0.056     7.6256
 74    0.058     7.3370
 74    0.060     7.0377
 74    0.062     6.7287
 74    0.064     6.4108
 74    0.066     6.0850
 74    0.068     5.7524
 74    0.070     5.4138
 74    0.072     5.0703
 74    0.074     4.7227
 74    0.076     4.3720
 74    0.078     4.0191
 74    0.080     3.6651
 76    0.000     7.3299
 76    0.002     7.7339
 76    0.004     8.1016
 76    0.006     8.4337
 76    0.008     8.7313
 76    0.010     8.9953
 76    0.012     9.2267
 76    0.014     9.4265
 76    0.016     9.5955
 76    0.018     9.7347
 76    0.020     9.8451
 76    0.022     9.9277
 76    0.024     9.9834
 76    0.026    10.0131
 76    0.028    10.0178
 76    0.030     9.9984
 76    0.032     9.9560
 76    0.034     9.8914
 76    0.036     9.8057
 76    0.038     9.6997
 76    0.040     9.5744
 76    0.042     9.4308
 76    0.044     9.2699
 76    0.046     9.0925
 76    0.048     8.8997
 76    0.050     8.6923
 76    0.052     8.4714
 76    0.054     8.2379
 76    0.056     7.9927
 76    0.058     7.7369
 76    0.060     7.4713
 76    0.062     7.1969
 76    0.064     6.9146
 76    0.066     6.6255
 76    0.068     6.3305
 76    0.070     6.0305
 76    0.072     5.7264
 76    0.074     5.4193
 76    0.076     5.1101
 76    0.078     4.7997
 76    0.080     4.4891
 78    0.000     7.1280
 78    0.002     7.5362
 78    0.004     7.9090
 78    0.006     8.2472
 78    0.008     8.5519
 78    0.010     8.8240
 78    0.012     9.0644
 78    0.014     9.2741
 78    0.016     9.4540
 78    0.018     9.6052
 78    0.020     9.7285
 78    0.022     9.8249
 78    0.024     9.8954
 78    0.026     9.9409
 78    0.028     9.9624
 78    0.030     9.9608
 78    0.032     9.9370
 78    0.034     9.8921
 78    0.036     9.8270
 78    0.038     9.7427
 78    0.040     9.6400
 78    0.042     9.5200
 78    0.044     9.3835
 78    0.046     9.2316
 78    0.048     9.0653
 78    0.050     8.8853
 78    0.052     8.6928
 78    0.054    8.48870
 78    0.056    8.27388
 78    0.058    8.04933
 78    0.060    7.81601
 78    0.062    7.57487
 78    0.064    7.32687
 78    0.066    7.07295
 78    0.068    6.81407
 78    0.070    6.55119
 78    0.072    6.28525
 78    0.074    6.01722
 78    0.076    5.74804
 78    0.078    5.47867
 78    0.080    5.21006
 80    0.000    6.88546
 80    0.002    7.29642
 80    0.004    7.67288
 80    0.006    8.01578
 80    0.008    8.32610
 80    0.010    8.60477
 80    0.012    8.85276
 80    0.014    9.07101
 80    0.016    9.26048
 80    0.018    9.42213
 80    0.020    9.55690
 80    0.022    9.66575
 80    0.024    9.74964
 80    0.026    9.80951
 80    0.028    9.84632
 80    0.030    9.86103
 80    0.032    9.85459
 80    0.034    9.82795
 80    0.036    9.78206
 80    0.038    9.71788
 80    0.040    9.63636
 80    0.042    9.53845
 80    0.044    9.42512
 80    0.046    9.29731
 80    0.048    9.15597
 80    0.050    9.00206
 80    0.052    8.83654
 80    0.054    8.66035
 80    0.056    8.47445
 80    0.058    8.27979
 80    0.060    8.07733
 80    0.062    7.86802
 80    0.064    7.65282
 80    0.066    7.43267
 80    0.068    7.20853
 80    0.070    6.98136
 80    0.072    6.75210
 80    0.074    6.52172
 80    0.076    6.29116
 80    0.078    6.06138
 80    0.080    5.83333
 82    0.000    6.60756
 82    0.002    7.01983
 82    0.004    7.39856
 82    0.006    7.74472
 82    0.008    8.05925
 82    0.010    8.34311
 82    0.012    8.59725
 82    0.014    8.82263
 82    0.016    9.02020
 82    0.018    9.19091
 82    0.020    9.33572
 82    0.022    9.45558
 82    0.024    9.55144
 82    0.026    9.62426
 82    0.028    9.67499
 82    0.030    9.70458
 82    0.032    9.71399
 82    0.034    9.70418
 82    0.036    9.67608
 82    0.038    9.63067
 82    0.040    9.56889
 82    0.042    9.49169
 82    0.044    9.40003
 82    0.046    9.29486
 82    0.048    9.17714
 82    0.050    9.04782
 82    0.052    8.90785
 82    0.054    8.75819
 82    0.056    8.59978
 82    0.058    8.43359
 82    0.060    8.26057
 82    0.062    8.08166
 82    0.064    7.89783
 82    0.066    7.71003
 82    0.068    7.51921
 82    0.070    7.32632
 82    0.072    7.13232
 82    0.074    6.93816
 82    0.076    6.74479
 82    0.078    6.55317
 82    0.080    6.36426
 84    0.000    6.29966
 84    0.002    6.71181
 84    0.004    7.09140
 84    0.006    7.43937
 84    0.008    7.75670
 84    0.010    8.04432
 84    0.012    8.30319
 84    0.014    8.53427
 84    0.016    8.73851
 84    0.018    8.91687
 84    0.020    9.07029
 84    0.022    9.19973
 84    0.024    9.30614
 84    0.026    9.39048
 84    0.028    9.45370
 84    0.030    9.49676
 84    0.032    9.52060
 84    0.034    9.52619
 84    0.036    9.51446
 84    0.038    9.48639
 84    0.040    9.44292
 84    0.042    9.38500
 84    0.044    9.31359
 84    0.046    9.22965
 84    0.048    9.13412
 84    0.050    9.02796
 84    0.052    8.91212
 84    0.054    8.78755
 84    0.056    8.65522
 84    0.058    8.51607
 84    0.060    8.37106
 84    0.062    8.22113
 84    0.064    8.06725
 84    0.066    7.91037
 84    0.068    7.75143
 84    0.070    7.59141
 84    0.072    7.43123
 84    0.074    7.27187
 84    0.076    7.11428
 84    0.078    6.95940
 84    0.080    6.80820
 86    0.000    5.96710
 86    0.002    6.37771
 86    0.004    6.75672
 86    0.006    7.10509
 86    0.008    7.42379
 86    0.010    7.71374
 86    0.012    7.97593
 86    0.014    8.21128
 86    0.016    8.42077
 86    0.018    8.60534
 86    0.020    8.76595
 86    0.022    8.90355
 86    0.024    9.01909
 86    0.026    9.11352
 86    0.028    9.18781
 86    0.030    9.24290
 86    0.032    9.27975
 86    0.034    9.29931
 86    0.036    9.30254
 86    0.038    9.29038
 86    0.040    9.26380
 86    0.042    9.22373
 86    0.044    9.17115
 86    0.046    9.10700
 86    0.048    9.03224
 86    0.050    8.94781
 86    0.052    8.85468
 86    0.054    8.75379
 86    0.056    8.64610
 86    0.058    8.53257
 86    0.060    8.41414
 86    0.062    8.29177
 86    0.064    8.16642
 86    0.066    8.03903
 86    0.068    7.91056
 86    0.070    7.78197
 86    0.072    7.65420
 86    0.074    7.52822
 86    0.076    7.40497
 86    0.078    7.28540
 86    0.080    7.17048
 88    0.000    5.61523
 88    0.002    6.02286
 88    0.004    6.39988
 88    0.006    6.74723
 88    0.008    7.06586
 88    0.010    7.35673
 88    0.012    7.62079
 88    0.014    7.85900
 88    0.016    8.07231
 88    0.018    8.26168
 88    0.020    8.42805
 88    0.022    8.57237
 88    0.024    8.69562
 88    0.026    8.79873
 88    0.028    8.88266
 88    0.030    8.94836
 88    0.032    8.99679
 88    0.034    9.02890
 88    0.036    9.04565
 88    0.038    9.04798
 88    0.040    9.03686
 88    0.042    9.01323
 88    0.044    8.97805
 88    0.046    8.93227
 88    0.048    8.87685
 88    0.050    8.81273
 88    0.052    8.74088
 88    0.054    8.66224
 88    0.056    8.57778
 88    0.058    8.48843
 88    0.060    8.39517
 88    0.062    8.29893
 88    0.064    8.20068
 88    0.066    8.10136
 88    0.068    8.00193
 88    0.070    7.90335
 88    0.072    7.80656
 88    0.074    7.71253
 88    0.076    7.62220
 88    0.078    7.53653
 88    0.080    7.45646
 90    0.000    5.24938
 90    0.002    5.65262
 90    0.004    6.02621
 90    0.006    6.37111
 90    0.008    6.68826
 90    0.010    6.97862
 90    0.012    7.24314
 90    0.014    7.48278
 90    0.016    7.69849
 90    0.018    7.89122
 90    0.020    8.06192
 90    0.022    8.21156
 90    0.024    8.34108
 90    0.026    8.45143
 90    0.028    8.54358
 90    0.030    8.61847
 90    0.032    8.67706
 90    0.034    8.72030
 90    0.036    8.74914
 90    0.038    8.76454
 90    0.040    8.76746
 90    0.042    8.75883
 90    0.044    8.73963
 90    0.046    8.71080
 90    0.048    8.67329
 90    0.050    8.62806
 90    0.052    8.57607
 90    0.054    8.51826
 90    0.056    8.45559
 90    0.058    8.38901
 90    0.060    8.31948
 90    0.062    8.24794
 90    0.064    8.17537
 90    0.066    8.10269
 90    0.068    8.03088
 90    0.070    7.96089
 90    0.072    7.89366
 90    0.074    7.83015
 90    0.076    7.77131
 90    0.078    7.71811
 90    0.080    7.67148
 92    0.000    4.87490
 92    0.002    5.27232
 92    0.004    5.64107
 92    0.006    5.98209
 92    0.008    6.29633
 92    0.010    6.58475
 92    0.012    6.84831
 92    0.014    7.08795
 92    0.016    7.30463
 92    0.018    7.49930
 92    0.020    7.67292
 92    0.022    7.82644
 92    0.024    7.96081
 92    0.026    8.07699
 92    0.028    8.17593
 92    0.030    8.25858
 92    0.032    8.32590
 92    0.034    8.37884
 92    0.036    8.41836
 92    0.038    8.44540
 92    0.040    8.46093
 92    0.042    8.46588
 92    0.044    8.46123
 92    0.046    8.44792
 92    0.048    8.42691
 92    0.050    8.39914
 92    0.052    8.36558
 92    0.054    8.32717
 92    0.056    8.28487
 92    0.058    8.23963
 92    0.060    8.19241
 92    0.062    8.14416
 92    0.064    8.09583
 92    0.066    8.04838
 92    0.068    8.00276
 92    0.070    7.95993
 92    0.072    7.92083
 92    0.074    7.88642
 92    0.076    7.85766
 92    0.078    7.83549
 92    0.080    7.82088
 94    0.000    4.49713
 94    0.002    4.88731
 94    0.004    5.24979
 94    0.006    5.58550
 94    0.008    5.89542
 94    0.010    6.18048
 94    0.012    6.44164
 94    0.014    6.67986
 94    0.016    6.89608
 94    0.018    7.09127
 94    0.020    7.26638
 94    0.022    7.42236
 94    0.024    7.56016
 94    0.026    7.68073
 94    0.028    7.78504
 94    0.030    7.87403
 94    0.032    7.94866
 94    0.034    8.00988
 94    0.036    8.05864
 94    0.038    8.09590
 94    0.040    8.12261
 94    0.042    8.13973
 94    0.044    8.14820
 94    0.046    8.14899
 94    0.048    8.14304
 94    0.050    8.13131
 94    0.052    8.11475
 94    0.054    8.09432
 94    0.056    8.07097
 94    0.058    8.04565
 94    0.060    8.01932
 94    0.062    7.99292
 94    0.064    7.96742
 94    0.066    7.94377
 94    0.068    7.92291
 94    0.070    7.90581
 94    0.072    7.89342
 94    0.074    7.88669
 94    0.076    7.88657
 94    0.078    7.89402
 94    0.080    7.90999
 96    0.000    4.12141
 96    0.002    4.50293
 96    0.004    4.85771
 96    0.006    5.18670
 96    0.008    5.49086
 96    0.010    5.77113
 96    0.012    6.02847
 96    0.014    6.26385
 96    0.016    6.47820
 96    0.018    6.67248
 96    0.020    6.84765
 96    0.022    7.00466
 96    0.024    7.14446
 96    0.026    7.26801
 96    0.028    7.37626
 96    0.030    7.47016
 96    0.032    7.55067
 96    0.034    7.61875
 96    0.036    7.67533
 96    0.038    7.72138
 96    0.040    7.75786
 96    0.042    7.78571
 96    0.044    7.80588
 96    0.046    7.81934
 96    0.048    7.82704
 96    0.050    7.82992
 96    0.052    7.82894
 96    0.054    7.82506
 96    0.056    7.81923
 96    0.058    7.81240
 96    0.060    7.80553
 96    0.062    7.79957
 96    0.064    7.79547
 96    0.066    7.79419
 96    0.068    7.79668
 96    0.070    7.80389
 96    0.072    7.81678
 96    0.074    7.83630
 96    0.076    7.86340
 96    0.078    7.89904
 96    0.080    7.94417
 98    0.000    3.75310
 98    0.002    4.12453
 98    0.004    4.47018
 98    0.006    4.79102
 98    0.008    5.08799
 98    0.010    5.36206
 98    0.012    5.61416
 98    0.014    5.84526
 98    0.016    6.05631
 98    0.018    6.24826
 98    0.020    6.42207
 98    0.022    6.57869
 98    0.024    6.71907
 98    0.026    6.84417
 98    0.028    6.95493
 98    0.030    7.05232
 98    0.032    7.13729
 98    0.034    7.21079
 98    0.036    7.27377
 98    0.038    7.32719
 98    0.040    7.37201
 98    0.042    7.40916
 98    0.044    7.43962
 98    0.046    7.46432
 98    0.048    7.48423
 98    0.050    7.50030
 98    0.052    7.51349
 98    0.054    7.52473
 98    0.056    7.53500
 98    0.058    7.54524
 98    0.060    7.55640
 98    0.062    7.56945
 98    0.064    7.58533
 98    0.066    7.60499
 98    0.068    7.62940
 98    0.070    7.65949
 98    0.072    7.69624
 98    0.074    7.74058
 98    0.076    7.79348
 98    0.078    7.85589
 98    0.080    7.92876
100    0.000    3.39752
100    0.002    3.75743
100    0.004    4.09255
100    0.006    4.40381
100    0.008    4.69217
100    0.010    4.95860
100    0.012    5.20404
100    0.014    5.42944
100    0.016    5.63577
100    0.018    5.82396
100    0.020    5.99498
100    0.022    6.14978
100    0.024    6.28932
100    0.026    6.41454
100    0.028    6.52640
100    0.030    6.62585
100    0.032    6.71385
100    0.034    6.79136
100    0.036    6.85931
100    0.038    6.91867
100    0.040    6.97040
100    0.042    7.01544
100    0.044    7.05475
100    0.046    7.08927
100    0.048    7.11998
100    0.050    7.14781
100    0.052    7.17372
100    0.054    7.19867
100    0.056    7.22361
100    0.058    7.24949
100    0.060    7.27727
100    0.062    7.30790
100    0.064    7.34233
100    0.066    7.38152
100    0.068    7.42641
100    0.070    7.47797
100    0.072    7.53715
100    0.074    7.60490
100    0.076    7.68217
100    0.078    7.76992
100    0.080    7.86910
102    0.000    3.06003
102    0.002    3.40700
102    0.004    3.73014
102    0.006    4.03040
102    0.008    4.30874
102    0.010    4.56610
102    0.012    4.80345
102    0.014    5.02173
102    0.016    5.22191
102    0.018    5.40492
102    0.020    5.57173
102    0.022    5.72329
102    0.024    5.86055
102    0.026    5.98447
102    0.028    6.09600
102    0.030    6.19609
102    0.032    6.28570
102    0.034    6.36578
102    0.036    6.43729
102    0.038    6.50117
102    0.040    6.55838
102    0.042    6.60988
102    0.044    6.65661
102    0.046    6.69954
102    0.048    6.73961
102    0.050    6.77778
102    0.052    6.81500
102    0.054    6.85223
102    0.056    6.89042
102    0.058    6.93052
102    0.060    6.97348
102    0.062    7.02027
102    0.064    7.07182
102    0.066    7.12911
102    0.068    7.19307
102    0.070    7.26467
102    0.072    7.34485
102    0.074    7.43458
102    0.076    7.53480
102    0.078    7.64646
102    0.080    7.77053
104    0.000    2.74596
104    0.002    3.07857
104    0.004    3.38832
104    0.006    3.67615
104    0.008    3.94303
104    0.010    4.18991
104    0.012    4.41774
104    0.014    4.62748
104    0.016    4.82008
104    0.018    4.99648
104    0.020    5.15766
104    0.022    5.30455
104    0.024    5.43812
104    0.026    5.55931
104    0.028    5.66908
104    0.030    5.76839
104    0.032    5.85818
104    0.034    5.93942
104    0.036    6.01304
104    0.038    6.08002
104    0.040    6.14129
104    0.042    6.19782
104    0.044    6.25056
104    0.046    6.30046
104    0.048    6.34848
104    0.050    6.39556
104    0.052    6.44267
104    0.054    6.49075
104    0.056    6.54076
104    0.058    6.59365
104    0.060    6.65037
104    0.062    6.71189
104    0.064    6.77915
104    0.066    6.85311
104    0.068    6.93471
104    0.070    7.02492
104    0.072    7.12469
104    0.074    7.23497
104    0.076    7.35671
104    0.078    7.49087
104    0.080    7.63840
106    0.000    2.46067
106    0.002    2.77749
106    0.004    3.07241
106    0.006    3.34639
106    0.008    3.60039
106    0.010    3.83536
106    0.012    4.05225
106    0.014    4.25202
106    0.016    4.43562
106    0.018    4.60399
106    0.020    4.75811
106    0.022    4.89891
106    0.024    5.02735
106    0.026    5.14440
106    0.028    5.25099
106    0.030    5.34808
106    0.032    5.43663
106    0.034    5.51760
106    0.036    5.59192
106    0.038    5.66057
106    0.040    5.72448
106    0.042    5.78462
106    0.044    5.84194
106    0.046    5.89739
106    0.048    5.95192
106    0.050    6.00649
106    0.052    6.06205
106    0.054    6.11956
106    0.056    6.17997
106    0.058    6.24423
106    0.060    6.31329
106    0.062    6.38812
106    0.064    6.46966
106    0.066    6.55886
106    0.068    6.65668
106    0.070    6.76408
106    0.072    6.88201
106    0.074    7.01141
106    0.076    7.15325
106    0.078    7.30847
106    0.080    7.47804
108    0.000    2.20949
108    0.002    2.50909
108    0.004    2.78777
108    0.006    3.04648
108    0.008    3.28617
108    0.010    3.50780
108    0.012    3.71233
108    0.014    3.90070
108    0.016    4.07387
108    0.018    4.23279
108    0.020    4.37842
108    0.022    4.51171
108    0.024    4.63361
108    0.026    4.74507
108    0.028    4.84706
108    0.030    4.94052
108    0.032    5.02640
108    0.034    5.10567
108    0.036    5.17927
108    0.038    5.24816
108    0.040    5.31329
108    0.042    5.37561
108    0.044    5.43608
108    0.046    5.49565
108    0.048    5.55528
108    0.050    5.61591
108    0.052    5.67851
108    0.054    5.74402
108    0.056    5.81340
108    0.058    5.88760
108    0.060    5.96758
108    0.062    6.05429
108    0.064    6.14868
108    0.066    6.25171
108    0.068    6.36433
108    0.070    6.48749
108    0.072    6.62214
108    0.074    6.76925
108    0.076    6.92976
108    0.078    7.10463
108    0.080    7.29481
110    0.000    1.99776
110    0.002    2.27872
110    0.004    2.53973
110    0.006    2.78174
110    0.008    3.00570
110    0.010    3.21258
110    0.012    3.40331
110    0.014    3.57886
110    0.016    3.74018
110    0.018    3.88822
110    0.020    4.02394
110    0.022    4.14829
110    0.024    4.26222
110    0.026    4.36668
110    0.028    4.46264
110    0.030    4.55104
110    0.032    4.63283
110    0.034    4.70898
110    0.036    4.78043
110    0.038    4.84813
110    0.040    4.91305
110    0.042    4.97613
110    0.044    5.03833
110    0.046    5.10060
110    0.048    5.16390
110    0.050    5.22917
110    0.052    5.29737
110    0.054    5.36947
110    0.056    5.44639
110    0.058    5.52912
110    0.060    5.61858
110    0.062    5.71575
110    0.064    5.82157
110    0.066    5.93699
110    0.068    6.06298
110    0.070    6.20048
110    0.072    6.35044
110    0.074    6.51383
110    0.076    6.69159
110    0.078    6.88467
110    0.080    7.09404
112    0.000    1.83083
112    0.002    2.09172
112    0.004    2.33364
112    0.006    2.55752
112    0.008    2.76433
112    0.010    2.95502
112    0.012    3.13054
112    0.014    3.29185
112    0.016    3.43989
112    0.018    3.57563
112    0.020    3.70001
112    0.022    3.81399
112    0.024    3.91853
112    0.026    4.01457
112    0.028    4.10307
112    0.030    4.18498
112    0.032    4.26126
112    0.034    4.33286
112    0.036    4.40073
112    0.038    4.46583
112    0.040    4.52912
112    0.042    4.59153
112    0.044    4.65403
112    0.046    4.71758
112    0.048    4.78312
112    0.050    4.85161
112    0.052    4.92400
112    0.054    5.00124
112    0.056    5.08429
112    0.058    5.17411
112    0.060    5.27164
112    0.062    5.37784
112    0.064    5.49366
112    0.066    5.62006
112    0.068    5.75799
112    0.070    5.90840
112    0.072    6.07225
112    0.074    6.25049
112    0.076    6.44407
112    0.078    6.65395
112    0.080    6.88108
114    0.000    1.71404
114    0.002    1.95344
114    0.004    2.17484
114    0.006    2.37917
114    0.008    2.56741
114    0.010    2.74048
114    0.012    2.89937
114    0.014    3.04500
114    0.016    3.17835
114    0.018    3.30035
114    0.020    3.41197
114    0.022    3.51417
114    0.024    3.60788
114    0.026    3.69407
114    0.028    3.77369
114    0.030    3.84769
114    0.032    3.91703
114    0.034    3.98266
114    0.036    4.04554
114    0.038    4.10661
114    0.040    4.16683
114    0.042    4.22715
114    0.044    4.28854
114    0.046    4.35193
114    0.048    4.41829
114    0.050    4.48856
114    0.052    4.56371
114    0.054    4.64469
114    0.056    4.73244
114    0.058    4.82792
114    0.060    4.93209
114    0.062    5.04590
114    0.064    5.17030
114    0.066    5.30625
114    0.068    5.45470
114    0.070    5.61660
114    0.072    5.79290
114    0.074    5.98457
114    0.076    6.19255
114    0.078    6.41780
114    0.080    6.66127
116    0.000    1.65273
116    0.002    1.86922
116    0.004    2.06867
116    0.006    2.25204
116    0.008    2.42026
116    0.010    2.57431
116    0.012    2.71512
116    0.014    2.84367
116    0.016    2.96089
116    0.018    3.06774
116    0.020    3.16518
116    0.022    3.25415
116    0.024    3.33562
116    0.026    3.41054
116    0.028    3.47985
116    0.030    3.54452
116    0.032    3.60549
116    0.034    3.66373
116    0.036    3.72018
116    0.038    3.77579
116    0.040    3.83153
116    0.042    3.88834
116    0.044    3.94718
116    0.046    4.00899
116    0.048    4.07475
116    0.050    4.14539
116    0.052    4.22187
116    0.054    4.30515
116    0.056    4.39617
116    0.058    4.49590
116    0.060    4.60529
116    0.062    4.72528
116    0.064    4.85683
116    0.066    5.00091
116    0.068    5.15845
116    0.070    5.33041
116    0.072    5.51775
116    0.074    5.72142
116    0.076    5.94238
116    0.078    6.18157
116    0.080    6.43995
118    0.000    1.65225
118    0.002    1.84440
118    0.004    2.02049
118    0.006    2.18145
118    0.008    2.32825
118    0.010    2.46183
118    0.012    2.58316
118    0.014    2.69318
118    0.016    2.79285
118    0.018    2.88313
118    0.020    2.96495
118    0.022    3.03929
118    0.024    3.10709
118    0.026    3.16931
118    0.028    3.22689
118    0.030    3.28080
118    0.032    3.33199
118    0.034    3.38140
118    0.036    3.43000
118    0.038    3.47873
118    0.040    3.52856
118    0.042    3.58043
118    0.044    3.63530
118    0.046    3.69411
118    0.048    3.75784
118    0.050    3.82742
118    0.052    3.90381
118    0.054    3.98797
118    0.056    4.08084
118    0.058    4.18339
118    0.060    4.29656
118    0.062    4.42132
118    0.064    4.55860
118    0.066    4.70937
118    0.068    4.87458
118    0.070    5.05518
118    0.072    5.25213
118    0.074    5.46638
118    0.076    5.69889
118    0.078    5.95059
118    0.080    6.22247
120    0.000    1.71794
120    0.002    1.88433
120    0.004    2.03562
120    0.006    2.17276
120    0.008    2.29670
120    0.010    2.40840
120    0.012    2.50882
120    0.014    2.59890
120    0.016    2.67959
120    0.018    2.75186
120    0.020    2.81666
120    0.022    2.87493
120    0.024    2.92763
120    0.026    2.97572
120    0.028    3.02016
120    0.030    3.06188
120    0.032    3.10185
120    0.034    3.14102
120    0.036    3.18034
120    0.038    3.22077
120    0.040    3.26326
120    0.042    3.30877
120    0.044    3.35824
120    0.046    3.41264
120    0.048    3.47290
120    0.050    3.54000
120    0.052    3.61488
120    0.054    3.69849
120    0.056    3.79179
120    0.058    3.89573
120    0.060    4.01127
120    0.062    4.13935
120    0.064    4.28094
120    0.066    4.43699
120    0.068    4.60844
120    0.070    4.79626
120    0.072    5.00139
120    0.074    5.22480
120    0.076    5.46742
120    0.078    5.73023
120    0.080    6.01416
122    0.000    1.85514
122    0.002    1.99435
122    0.004    2.11942
122    0.006    2.23131
122    0.008    2.33097
122    0.010    2.41936
122    0.012    2.49744
122    0.014    2.56615
122    0.016    2.62645
122    0.018    2.67929
122    0.020    2.72562
122    0.022    2.76640
122    0.024    2.80259
122    0.026    2.83513
122    0.028    2.86498
122    0.030    2.89310
122    0.032    2.92043
122    0.034    2.94793
122    0.036    2.97656
122    0.038    3.00726
122    0.040    3.04099
122    0.042    3.07870
122    0.044    3.12136
122    0.046    3.16990
122    0.048    3.22529
122    0.050    3.28847
122    0.052    3.36041
122    0.054    3.44205
122    0.056    3.53435
122    0.058    3.63826
122    0.060    3.75474
122    0.062    3.88474
122    0.064    4.02921
122    0.066    4.18910
122    0.068    4.36537
122    0.070    4.55898
122    0.072    4.77087
122    0.074    5.00201
122    0.076    5.25333
122    0.078    5.52581
122    0.080    5.82038
124    0.000    2.06920
124    0.002    2.17979
124    0.004    2.27722
124    0.006    2.36243
124    0.008    2.43640
124    0.010    2.50006
124    0.012    2.55437
124    0.014    2.60028
124    0.016    2.63876
124    0.018    2.67074
124    0.020    2.69719
124    0.022    2.71906
124    0.024    2.73731
124    0.026    2.75287
124    0.028    2.76672
124    0.030    2.77980
124    0.032    2.79307
124    0.034    2.80748
124    0.036    2.82398
124    0.038    2.84352
124    0.040    2.86707
124    0.042    2.89557
124    0.044    2.92998
124    0.046    2.97125
124    0.048    3.02033
124    0.050    3.07818
124    0.052    3.14575
124    0.054    3.22400
124    0.056    3.31388
124    0.058    3.41633
124    0.060    3.53233
124    0.062    3.66281
124    0.064    3.80873
124    0.066    3.97105
124    0.068    4.15072
124    0.070    4.34869
124    0.072    4.56592
124    0.074    4.80336
124    0.076    5.06196
124    0.078    5.34267
124    0.080    5.64646
126    0.000    2.36546
126    0.002    2.44601
126    0.004    2.51437
126    0.006    2.57149
126    0.008    2.61832
126    0.010    2.65582
126    0.012    2.68494
126    0.014    2.70664
126    0.016    2.72187
126    0.018    2.73157
126    0.020    2.73672
126    0.022    2.73825
126    0.024    2.73712
126    0.026    2.73429
126    0.028    2.73071
126    0.030    2.72733
126    0.032    2.72511
126    0.034    2.72500
126    0.036    2.72795
126    0.038    2.73492
126    0.040    2.74686
126    0.042    2.76472
126    0.044    2.78946
126    0.046    2.82203
126    0.048    2.86338
126    0.050    2.91447
126    0.052    2.97625
126    0.054    3.04968
126    0.056    3.13571
126    0.058    3.23528
126    0.060    3.34937
126    0.062    3.47891
126    0.064    3.62486
126    0.066    3.78818
126    0.068    3.96982
126    0.070    4.17073
126    0.072    4.39187
126    0.074    4.63419
126    0.076    4.89864
126    0.078    5.18617
126    0.080    5.49775
128    0.000    2.74925
128    0.002    2.79834
128    0.004    2.83621
128    0.006    2.86380
128    0.008    2.88208
128    0.010    2.89200
128    0.012    2.89451
128    0.014    2.89057
128    0.016    2.88112
128    0.018    2.86712
128    0.020    2.84953
128    0.022    2.82930
128    0.024    2.80738
128    0.026    2.78473
128    0.028    2.76229
128    0.030    2.74103
128    0.032    2.72190
128    0.034    2.70584
128    0.036    2.69382
128    0.038    2.68678
128    0.040    2.68569
128    0.042    2.69148
128    0.044    2.70513
128    0.046    2.72757
128    0.048    2.75977
128    0.050    2.80268
128    0.052    2.85725
128    0.054    2.92443
128    0.056    3.00518
128    0.058    3.10046
128    0.060    3.21121
128    0.062    3.33838
128    0.064    3.48294
128    0.066    3.64584
128    0.068    3.82802
128    0.070    4.03045
128    0.072    4.25407
128    0.074    4.49984
128    0.076    4.76872
128    0.078    5.06165
128    0.080    5.37959
130    0.000    3.22593
130    0.002    3.24213
130    0.004    3.24808
130    0.006    3.24473
130    0.008    3.23304
130    0.010    3.21395
130    0.012    3.18842
130    0.014    3.15740
130    0.016    3.12186
130    0.018    3.08274
130    0.020    3.04099
130    0.022    2.99757
130    0.024    2.95343
130    0.026    2.90953
130    0.028    2.86682
130    0.030    2.82624
130    0.032    2.78877
130    0.034    2.75535
130    0.036    2.72692
130    0.038    2.70446
130    0.040    2.68891
130    0.042    2.68121
130    0.044    2.68234
130    0.046    2.69324
130    0.048    2.71486
130    0.050    2.74816
130    0.052    2.79409
130    0.054    2.85360
130    0.056    2.92765
130    0.058    3.01720
130    0.060    3.12319
130    0.062    3.24657
130    0.064    3.38831
130    0.066    3.54936
130    0.068    3.73066
130    0.070    3.93318
130    0.072    4.15786
130    0.074    4.40567
130    0.076    4.67754
130    0.078    4.97444
130    0.080    5.29733
132    0.000    3.80084
132    0.002    3.78273
132    0.004    3.75534
132    0.006    3.71961
132    0.008    3.67651
132    0.010    3.62699
132    0.012    3.57200
132    0.014    3.51249
132    0.016    3.44943
132    0.018    3.38375
132    0.020    3.31642
132    0.022    3.24839
132    0.024    3.18061
132    0.026    3.11403
132    0.028    3.04962
132    0.030    2.98831
132    0.032    2.93107
132    0.034    2.87886
132    0.036    2.83261
132    0.038    2.79329
132    0.040    2.76186
132    0.042    2.73925
132    0.044    2.72643
132    0.046    2.72436
132    0.048    2.73397
132    0.050    2.75624
132    0.052    2.79211
132    0.054    2.84253
132    0.056    2.90845
132    0.058    2.99084
132    0.060    3.09065
132    0.062    3.20882
132    0.064    3.34632
132    0.066    3.50409
132    0.068    3.68309
132    0.070    3.88427
132    0.072    4.10859
132    0.074    4.35700
132    0.076    4.63045
132    0.078    4.92990
132    0.080    5.25629
134    0.000    4.47932
134    0.002    4.42547
134    0.004    4.36331
134    0.006    4.29379
134    0.008    4.21786
134    0.010    4.13648
134    0.012    4.05060
134    0.014    3.96118
134    0.016    3.86917
134    0.018    3.77551
134    0.020    3.68117
134    0.022    3.58710
134    0.024    3.49426
134    0.026    3.40358
134    0.028    3.31604
134    0.030    3.23258
134    0.032    3.15415
134    0.034    3.08172
134    0.036    3.01622
134    0.038    2.95863
134    0.040    2.90988
134    0.042    2.87094
134    0.044    2.84275
134    0.046    2.82628
134    0.048    2.82247
134    0.050    2.83227
134    0.052    2.85665
134    0.054    2.89655
134    0.056    2.95293
134    0.058    3.02674
134    0.060    3.11894
134    0.062    3.23047
134    0.064    3.36230
134    0.066    3.51537
134    0.068    3.69064
134    0.070    3.88907
134    0.072    4.11160
134    0.074    4.35918
134    0.076    4.63279
134    0.078    4.93336
134    0.080    5.26184
136    0.000    5.26671
136    0.002    5.17570
136    0.004    5.07734
136    0.006    4.97260
136    0.008    4.86242
136    0.010    4.74776
136    0.012    4.62957
136    0.014    4.50881
136    0.016    4.38642
136    0.018    4.26336
136    0.020    4.14059
136    0.022    4.01906
136    0.024    3.89972
136    0.026    3.78352
136    0.028    3.67143
136    0.030    3.56438
136    0.032    3.46335
136    0.034    3.36927
136    0.036    3.28310
136    0.038    3.20580
136    0.040    3.13832
136    0.042    3.08162
136    0.044    3.03664
136    0.046    3.00434
136    0.048    2.98568
136    0.050    2.98160
136    0.052    2.99306
136    0.054    3.02102
136    0.056    3.06643
136    0.058    3.13024
136    0.060    3.21340
136    0.062    3.31687
136    0.064    3.44160
136    0.066    3.58855
136    0.068    3.75867
136    0.070    3.95291
136    0.072    4.17222
136    0.074    4.41757
136    0.076    4.68990
136    0.078    4.99016
136    0.080    5.31931
138    0.000    6.16835
138    0.002    6.03876
138    0.004    5.90279
138    0.006    5.76140
138    0.008    5.61554
138    0.010    5.46617
138    0.012    5.31425
138    0.014    5.16072
138    0.016    5.00653
138    0.018    4.85265
138    0.020    4.70002
138    0.022    4.54960
138    0.024    4.40234
138    0.026    4.25920
138    0.028    4.12113
138    0.030    3.98907
138    0.032    3.86400
138    0.034    3.74685
138    0.036    3.63859
138    0.038    3.54016
138    0.040    3.45253
138    0.042    3.37663
138    0.044    3.31344
138    0.046    3.26389
138    0.048    3.22895
138    0.050    3.20956
138    0.052    3.20669
138    0.054    3.22128
138    0.056    3.25429
138    0.058    3.30667
138    0.060    3.37937
138    0.062    3.47335
138    0.064    3.58957
138    0.066    3.72897
138    0.068    3.89251
138    0.070    4.08114
138    0.072    4.29581
138    0.074    4.53749
138    0.076    4.80712
138    0.078    5.10565
138    0.080    5.43405
140    0.000    7.18959
140    0.002    7.01999
140    0.004    6.84498
140    0.006    6.66552
140    0.008    6.48256
140    0.010    6.29706
140    0.012    6.10997
140    0.014    5.92225
140    0.016    5.73484
140    0.018    5.54871
140    0.020    5.36480
140    0.022    5.18406
140    0.024    5.00746
140    0.026    4.83595
140    0.028    4.67047
140    0.030    4.51199
140    0.032    4.36145
140    0.034    4.21982
140    0.036    4.08803
140    0.038    3.96705
140    0.040    3.85783
140    0.042    3.76133
140    0.044    3.67849
140    0.046    3.61027
140    0.048    3.55762
140    0.050    3.52150
140    0.052    3.50287
140    0.054    3.50266
140    0.056    3.52185
140    0.058    3.56138
140    0.060    3.62220
140    0.062    3.70527
140    0.064    3.81154
140    0.066    3.94196
140    0.068    4.09750
140    0.070    4.27910
140    0.072    4.48771
140    0.074    4.72429
140    0.076    4.98980
140    0.078    5.28518
140    0.080    5.61139
;
run;

/* Define macro variables for the number of contour levels and     */
/* colors for those levels. &NLEVELS is used to divide YIELD into */
/* ranges. &COLORS provides the colors for the ranges. The number */
/* of colors should match the number of levels.       */
%let upperlimits= 2    4    6   6.5 6.8  7   8           ;
%let colors     = vibg dabg mob day deoy grp orange depk ;

/* Determine the minimum and maximum values of TEMP, CATALYST,      */
/* and YIELD. The minimum and maximum values are used to calculate */
/* the intervals for the data, to determine the range for the z    */
/* axis, and to draw the legend.           */
proc means data=results noprint min max;
   var temp catalyst yield;
   output out=range
          min=tempmin catmin yieldmin
          max=tempmax catmax yieldmax;
run;

/* Define macro variables used to draw the surface, x-y plane, and */
/* legend. The minimum and maximum values for TEMP, CATALYST, and  */
/* YIELD are used in the DATA steps that produce the surface, x-y  */
/* plane, and legend. &FLOOR and &CEIL calculate the range for the */
/* z axis. &STEP is used to divide the values of YIELD into ranges.*/

data _null_;
   set range;
   call symput('tempmin', tempmin);
   call symput('tempmax', tempmax);
   call symput('catmin', catmin);
   call symput('catmax', catmax);
   call symput('yieldmin', yieldmin);
   call symput('yieldmax', yieldmax);
   call symput('floor', int(yieldmin-4));
   call symput('ceil',  int(yieldmax+2));
   call symput('step', (yieldmax-yieldmin)/&nlevels);
run;

/* Sort RESULTS by TEMP and CATALYST. RESULTS must be sorted by */
/* TEMP to draw the lines from the TEMP axis.       */

proc sort data=results out=sorted;
   by temp catalyst;
run;

/* Create the Annotate data sets, PLANE1 and SURF1. PLANE1 draws */
/* the lines on the x-y plane that begin at the TEMP axis. SURF1 */
/* draws the lines on the surface that begin at the TEMP axis.   */
/* Because data values draw the lines, XSYS, YSYS, and ZSYS must */
/* use the absolute data value coordinate system, 2.             */

data PLANE1 SURF1;
   length FUNCTION COLOR $ 8;
   retain XSYS YSYS ZSYS '2';
   keep X Y Z XSYS YSYS ZSYS FUNCTION COLOR ;
   set SORTED;
   by TEMP;

/* Each line begins at coordinates defined by TEMP and CATALYST in */
/* FIRST.TEMP. The lines on the x-y plane are drawn at a constant  */
/* value of Z=&FLOOR. (The constant for Z matches the value of     */
/* ZMIN= in the G3D step.)                                         */

   X=TEMP; Y=CATALYST; 

   COLOR=scan("&colors",1);
   do I=2 to countw("&upperlimits",' ');
     if YIELD > input(scan("&upperlimits",I,' '),32.)
       then COLOR=scan("&colors",I);
   end;
   
   FUNCTION=ifc(first.TEMP ,'move', 'draw');

/* PLANE1 collects the annotation where Z is constant at &FLOOR, */
/* producing a "flat" plane. In SURF1, Z changes to YIELD, which */
/* produces the curved surface.           */

   Z=&floor.; output PLANE1;
   Z=YIELD;   output SURF1;
run;

/* Sort RESULTS by CATALYST and TEMP. RESULTS must be sorted by */
/* CATALYST to draw the lines from the CATALYST axis.    */

proc sort data=sorted out=sorted2;
   by catalyst temp;
run;

/* Create the Annotate data set, PLANE2 and SURF2. PLANE2 and */
/* SURF2 draw the lines that begin at the CATALYST axis.      */

data PLANE2 SURF2;
   length FUNCTION COLOR $ 8;
   retain XSYS YSYS ZSYS '2';
   keep X Y Z XSYS YSYS ZSYS FUNCTION COLOR ;
   set SORTED2;
   by CATALYST;

/* The method of producing the lines is almost identical. Because */
/* the data are sorted and processed by CATALYST, the lines are   */
/* drawn from the CATALYST axis instead of from the TEMP axis.     */

   X=TEMP; Y=CATALYST; 

   COLOR=scan("&colors",1);
   do I=2 to countw("&upperlimits",' ');
     if YIELD > input(scan("&upperlimits",I,' '),32.)
       then COLOR=scan("&colors",I);
   end;

   FUNCTION=ifc(first.CATALYST ,'move', 'draw');

   Z=&floor.; output PLANE2;
   Z=YIELD;   output SURF2;
run;

/* Create the Annotate data set, LEGEND. LEGEND produces the    */
/* legend on the z axis that explains the values represented by */
/* colors on the surface and plane.        */

data LEGEND;
   length FUNCTION COLOR STYLE $ 8;
   retain XSYS YSYS ZSYS '2' STYLE 'solid';
   keep X Y Z XSYS YSYS ZSYS FUNCTION COLOR STYLE ;

/* Polygons in the legend are drawn from the minimum to maximum */
/* values, using &STEP as the interval.        */

    X=&tempmin.; 
    Y=&catmax.; 
    Z=&yieldmin.;

    do I=1 to countw("&upperlimits",' ');
      COLOR   =scan("&colors",I);
      FUNCTION='poly'; 
      output;

      FUNCTION='polycont';
      X=&tempmin.+(&tempmax.-&tempmin.)*.05; 
      output;

      Z=scan("&upperlimits",I+1,' ');
      if Z=. then Z=&yieldmax.;
      output;

      X=&tempmin.; 
      output;
   end;

run;

/* Merge the Annotate data sets. The annotation in ANNOALL  */
/* produces the legend, surface, and contours on the plane. */

data annoall;
   set surf1 surf2 plane1 plane2 legend;
run;

/* Create the input data set, PLOTDATA, for the surface plot.    */
/* PLOTDATA contains the minimum and maximum values for the data */
/* in RESULTS so that G3D can produces the axes.     */

data plotdata;
   temp=&tempmin; catalyst=&catmin; yield=&floor; output;
   temp=&tempmax; catalyst=&catmax; output;
run;

/* Add a title to the graph */

/* Produce the surface plot. The G3D procedure actually produces */
/* a scatter plot with only 2 points, the minimum and maximum    */
/* data values in PLOTDATA. Plotting these values ensures that   */
/* the axes include the full range for the data. The SCATTER     */
/* statement includes the annotation in ANNOALL.The LABEL        */
/* statement specifies how the names of the variables are      */
/* displayed.               */
               
proc g3d data=plotdata;
   scatter catalyst*temp=yield/rotate=40 xticknum=5 yticknum=5 zticknum=5
                   shape='point' zmin=&floor zmax=&ceil. annotate=annoall;
run;
quit;

proc g3d data=plotdata;
   scatter catalyst*temp=yield/rotate=40 xticknum=5 yticknum=5 zticknum=5
                   shape='point' zmin=&floor zmax=15 annotate=annoall;
run;
quit;


 

 

 

 

 

 

 

Ask a Question
Discussion stats
  • 9 replies
  • 304 views
  • 2 likes
  • 2 in conversation