表4:作图语句中关于填充,线的特征,数据点标签等的设置
如填充的颜色,线的特征(线型,线的粗细,线的颜色),数据标签(颜色,大小,符号) 注:MARKERATTRS的一些常用符号:
LINEATTRS的一些常用符号:
例子:
/*例1*/
proc sgplot data=sashelp.class;
scatter x=height y=weight / group=sex; run;
/*例2*/
proc sgplot data=sashelp.stocks(where=(date >= \ and stock = \));
title \; *Create the series plots; series x=date y=close; series x=date y=low; series x=date y=high; run;
/*例3*/
proc sgplot data=sashelp.class; reg x=height y=weight / CLM CLI; run;
/*例4*/
proc sgplot data=sashelp.iris; title \; scatter x=petallength y=petalwidth; ellipse x=petallength y=petalwidth;
keylegend / location=inside position=bottomright; run;
/*例5*/
proc sgplot data=sashelp.classfit;
title \;
band x=height lower=lower upper=upper / legendlabel=\ name=\;
band x=height lower=lowermean upper=uppermean / fillattrs=GraphConfidence2
legendlabel=\ name=\; scatter x=height y=weight;
series x=height y=predict / lineattrs=GraphPrediction legendlabel=\ name=\;
keylegend \ \ \ / location=inside position=bottomright; run;
/*例6*/
proc sgplot data=sashelp.class(where=(age<16));
dot age / response=height stat=mean limitstat=stddev numstd=1; run;
/*例7*/
proc sgplot data=sashelp.heart; title \; histogram cholesterol; density cholesterol;
density cholesterol / type=kernel;
keylegend / location=inside position=topright; run;
/*例8*/
proc sgplot data=sashelp.heart;
title \; hbox cholesterol / category=weight_status; run;
/*例9*/
proc sgplot data=sashelp.stocks (where=(date >= \ and date <= \and stock = \)); title \; vbar date / response=volume;
vline date / response=close y2axis; run;