webgu 发表于 2012-12-8 11:41 
另一种方法,例子:
/* Data preparation*/
今天看到一个更简单的做法:
ods graphics / imagename="regplot" imagefmt=png;
ods listing gpath="D:\***";
ods listing on;
proc template;
define statgraph intro;
begingraph;
entrytitle "Simple 3x2 Lattice with Five Cells Populated";
layout gridded / columns=3;
/* stand-alone plot statements define cells 1-3 */
boxplot x=sex y=age;
boxplot x=sex y=height;
boxplot x=sex y=weight;
/* overlay blocks define cells 4-5 */
layout overlay;
scatterplot y=weight x=height;
pbsplineplot y=weight x=height;
entry halign=right "Spline" / valign=bottom;
endlayout;
layout overlay;
scatterplot y=weight x=height;
loessplot y=weight x=height;
entry halign=right "Loess " / valign=bottom;
endlayout;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.class template=intro;
run;