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;
本文来自博客园,作者:Iving,转载请注明原文链接:https://www.cnblogs.com/SAS-T/p/15368424.html