SAS seriesplot

 

 

data GTL_GS_SeriesGroup; 
format Date Date9.; 
do i=0 to 334 by 30; 
date='01jan2009'd+i; 
if mod (i, 30) =0 then freq=1; else freq=0; 
Drug='Drug A'; Val = 16+ 3*sin(i/90+0.5) + 1*sin(3*i/90+0.7); output; 
Drug='Drug B'; Val = 10+ 3*sin(i/90+0.5) + 1*cos(3*i/90+0.7); output; 
Drug='Drug C'; Val =  6+ 3*cos(i/90+0.5) + 1*sin(3*i/90+0.7); output; 
end; 
run;

ods html;

*
SUBPIXEL:to generate more smooth and precise bar/line
CURVELABEL
DISPLAY
SMOOTHCONNECT
;

proc template;
define statgraph _seriesplot;
begingraph / subpixel = on;
    layout overlay / yaxisopts = (griddisplay = on label = "Response") xaxisopts = (griddisplay = on display = (ticks tickvalues));
        seriesplot x = date y = val / group = drug curvelabel = drug display = (markers) 
                                    smoothconnect = true lineattrs = (thickness = 2);
    endlayout;
endgraph;
end;
run;

proc sgrender data = GTL_GS_SeriesGroup template = _seriesplot;
run;

ods _all_ close;

 

posted @ 2021-10-05 12:34  Iving  阅读(241)  评论(0编辑  收藏  举报