1. 首页
  2. 自学中心
  3. 软件
  4. SAS

Proc sgplot ——SAS statistical graphics procedure

from http://blog.sina.com.cn/s/blog_4b62a6270100g65q.html

SAS 9.2 新增的过程步 proc sgplot提供了强大的绘图功能。

几个简单的例子:

Proc sgplot ——SAS statistical graphics procedure

 proc sgplot data=sashelp.stocks
 (where=(date >= “01jan2000″d and stock = “IBM”));
 title “Stock Trend”; 
 series x=date y=close;
 series x=date y=low;
 series x=date y=high;
run;

Proc sgplot ——SAS statistical graphics procedure

PROC SGPLOT DATA = test9;
  TITLE ‘PEMOVR’;
  SERIES X = Date Y =pred / group=Month_ratio  MARKERS LINEATTRS = (THICKNESS =3);
  XAXIS TYPE = DISCRETE;
  keylegend / location=inside position=top;
run;Proc sgplot ——SAS statistical graphics procedure

proc sgplot data=sashelp.class(where=(age<16));
 dot age / response=height stat=mean
           limitstat=stddev numstd=1;
run;

Proc sgplot ——SAS statistical graphics procedure

proc sgplot;
  vbar day / response=t stat=mean limits=both LIMITSTAT=STDERR BARWIDTH=0.4 ;
  vline day / response=h stat=mean limits=both LIMITSTAT=STDERR y2axis;
  yaxis min=0 max=30 ;
  y2axis min=0 max=600 ;
run;

proc sgplot 具体选项设置: http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/sgplot-chap.htm

 PROC SGPLOT Statement 
 BAND Statement 
 DENSITY Statement 
 DOT Statement 
 ELLIPSE Statement 
 HBAR Statement 
 HBOX Statement 
 HISTOGRAM Statement 
 HLINE Statement 
 INSET Statement 
 KEYLEGEND Statement 
 LOESS Statement 
 NEEDLE Statement 
 PBSPLINE Statement 
 REFLINE Statement 
 REG Statement 
 SCATTER Statement 
 SERIES Statement 
 STEP Statement 
 VBAR Statement 
 VBOX Statement 
 VECTOR Statement 
 VLINE Statement 
 XAXIS, X2AXIS, YAXIS, Y2AXIS Statements 

SUGI上一篇很好的的教程:

Using PROC SGPLOT for Quick High Quality Graphs.pdf

http://support.sas.com/resources/papers/proceedings09/158-2009.pdf

Proc sgplot ——SAS statistical graphics procedure

 

原创文章,作者:xsmile,如若转载,请注明出处:http://www.17bigdata.com/proc-sgplot-sas-statistical-graphics-procedure/

联系我们

在线咨询:点击这里给我发消息

邮件:23683716@qq.com

跳至工具栏