SAS needleplot
data GTL_GS_NeedleLabel;
format Date Date9.;
format a 4.3;
do i=0 to 334 by 30;
date='01jan2009'd+i; A = 16+ 3*sin(i/90+0.5) + 1*sin(3*i/90+0.7); output;
end;
run;
*
datalabel
datalabelattrs = (symbol = circlefilled)
display = ()
markerattrs = ()
lineattrs = ()
;
ods html;
proc template;
define statgraph _needleplot;
begingraph;
entrytitle "Response over time";
layout overlay / xaxisopts = (display = (ticks tickvalues line) offsetmin = 0) yaxisopts = (label = "Response" offsetmin = 0.5);
needleplot x = date y = a / display = (markers) lineattrs = (thickness = 3) datalabel = a
markerattrs = (symbol = circlefilled size = 11)
datalabelposition = top datalabelattrs = (size = 5);
endlayout;
endgraph;
end;
run;
proc sgrender data = GTL_GS_NeedleLabel template = _needleplot;
run;
本文来自博客园,作者:Iving,转载请注明原文链接:https://www.cnblogs.com/SAS-T/p/15368395.html