全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3913 5
2018-01-13
复制代码


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2018-1-13 17:15:50
/*Grouping a Scatter Plot*/
proc sgplot data=sashelp.class;  
  scatter x=height y=weight / group=sex;  
run;  

/*Plotting Three Series*/  
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;  

/*Adding Prediction and Confidence Bands to a Regression Plot*/  
proc sgplot data=sashelp.class;  
  reg x=height y=weight / CLM CLI;  
run;  

/*Adding a Prediction Ellipse to a Scatter Plot*/
proc sgplot data=sashelp.iris;  
  title "Iris Petal Dimensions";  
  scatter x=petallength y=petalwidth;  
  ellipse x=petallength y=petalwidth;  
  keylegend / location=inside position=bottomright;  
run;

/*Creating Lines and Bands from Pre-Computed Data*/
proc sgplot data=sashelp.classfit;  
  title "Fit and Confidence Band from Precomputed Data";  
  band x=height lower=lower upper=upper /  
       legendlabel="95% CLI" name="band1";  
  band x=height lower=lowermean upper=uppermean /  
       fillattrs=GraphConfidence2  
       legendlabel="95% CLM" name="band2";  
  scatter x=height y=weight;  
  series x=height y=predict / lineattrs=GraphPrediction  
         legendlabel="Predicted Fit" name="series";  
  keylegend "series" "band1" "band2" / location=inside position=bottomright;  
run;  

/*Adding Statistical Limits to a Dot Plot*/
proc sgplot data=sashelp.class(where=(age<16));  
  dot age / response=height stat=mean  
            limitstat=stddev numstd=1;  
run;

/*Combining Histograms with Density Plots*/
proc sgplot data=sashelp.heart;  
  title "Cholesterol Distribution";  
  histogram cholesterol;  
  density cholesterol;  
  density cholesterol / type=kernel;  
  keylegend / location=inside position=topright;  
run;  


/*Creating a Horizontal Box Plot*/  
proc sgplot data=sashelp.heart;  
  title "Cholesterol Distribution by Weight Class";  
  hbox cholesterol / category=weight_status;  
run;  

/*Creating a Bar-Line Chart*/  
proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d  
                                 and date <= "01jan2001"d  
                                 and stock = "IBM"));  
   title "Stock Volume vs. Close";  
   vbar date / response=volume;  
   vline date / response=close y2axis;  
run;  

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-1-13 17:54:56
谢谢分享
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-1-13 18:08:27
钱学森64 发表于 2018-1-13 17:54
谢谢分享
不好意思,刚刚贴错了,现在的是完整的。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-1-13 18:09:23
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2018-1-15 21:45:11
谢谢分享
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群