曲面图
[code:8cde5]ods html file='c:\test1.html';
goptions device=activex;
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;
proc g3grid data=nums out=default;
grid y*x=z / axis1=-5 to 5 by .5
axis2=-5 to 5 by .5;
run;
proc g3d data=default;
plot y*x=z;
run;
quit;
ods html close;[/code:8cde5]
等高线图
[code:8cde5]ods html file='c:\test2.html';
goptions device=activex;
data swirl;
do x=-5 to 5 by 0.25;
do y=-5 to 5 by 0.25;
if x+y=0 then
z=0;
else
z=(x*y)*((x*x-y*y)/(x*x+y*y));
output;
end;
end;
run;
proc gcontour data=swirl;
plot y*x=z / pattern;
run;
quit;
ods html close;[/code:8cde5]