XAXISOPTS = (TYPE = time timeopts = (interval = month))
指定使用坐标轴的类型,指定坐标轴的间隔
ods html;
proc template;
define statgraph _boxplot;
begingraph;
layout overlay / xaxisopts = (display = (ticks tickvalues)) yaxisopts = (griddisplay = on);
boxplot y = cholesterol x= deathcause / orient = horizontal;
endlayout;
endgraph;
end;
run;
proc sgrender data = sashelp.heart template = _boxplot;
run;
data GTL_GS_IntervalBoxGroup;
format Date date6.;
drop i;
do Date='01Jan2009'd, '15Jan2009'd,'15Mar2009'd,
'01May2009'd, '01Aug2009'd;
do i=1 to 10;
Response=rannorm(2); Drug='A'; output;
Response=ranuni(2); Drug='A'; output;
Response=rannorm(2); Drug='B'; output;
Response=ranuni(2); Drug='B'; output;
end;
end;
run;
ods html;
proc template;
define statgraph _boxplot;
begingraph;
layout overlay / xaxisopts = (type = time timeopts = (interval = month) display = (ticks tickvalues)) yaxisopts = (griddisplay = on);
boxplot y = response x= date / group = drug groupdisplay = cluster name = "a";
discretelegend 'a' / location = inside across = 2 halign = right valign = bottom title = "Treatment: ";
endlayout;
endgraph;
end;
run;
proc sgrender data = GTL_GS_IntervalBoxGroup template = _boxplot;
run;
本文来自博客园,作者:Iving,转载请注明原文链接:https://www.cnblogs.com/SAS-T/p/15368791.html