- 1、本文档共23页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Sas代码作图详解(图文并茂)
Sas代码作图详解?SAS/Graph太强大了,本文主要讲一些常用且功能强大的Graph相关的过程步。1 proc gplot的简单例子proc gplot data=sashelp.shoes; plot?? Returns * Sales?? ;run;结果:??2 我们也可以只画出符合条件的数据的图形。proc gplot data=sashelp.shoes;where Region in(United States, Eastern Europe); plot?? Returns * Sales?? ;run;结果:??3 输出的图像都是默认的黑色的小十字,因此我们不能区分来自不同地区的数据,下面的程序就是为了解决这一问题proc gplot data=sashelp.shoes;where Region in(United States, Eastern Europe); plot?? Returns * Sales= Region;run;结果:?这里红色的来自美国,黑色的来自东欧,当然我们也可以自己设定颜色(SAS基本颜色有:black, red, green, blue, cyan, magenta, grey, pink, orange, brown, and yellow)。?4 设定坐标轴和所有文字和颜色proc gplot data=sashelp.shoes;where Region in(United States, Eastern Europe); plot?? Returns * Sales= Region/ caxis=blue ctext=red grid;run;结果:??5 如果要对网格进行更精细地设置,则要用到AUTOHREF和AUTOVREF选项。AUTOHREF中,LHREF设置水平线的线类型,CHREF设置水平线的线颜色;AUTOVREF中,LVREF设置垂直线的线类型,CVREF设置垂直线的线颜色。proc gplot data=sashelp.shoes;where Region in(United States, Eastern Europe); plot?? Returns * Sales= Region/ autohref? lhref=2 chref=lime autovref? lvref=5 cvref=pink caxis=blue ctext=red ;run;结果:??6 还可以用VAXIS和HAXIS分别设置纵轴和横轴的刻度。注意:如果某个数据超过了你指定的这个刻度,那么这个数据将不会被输出,因此在用这两个选项时要非常小心。proc gplot data=sashelp.shoes;where Region in(United States, Eastern Europe); plot?? Returns * Sales= Region/ vaxis=0 to 15000 by 5000 autohref? lhref=2 chref=lime autovref? lvref=5 cvref=pink caxis=blue ctext=red ;run;结果:??7 下面介绍一些有关Graph相关过程的全局(global)设置??title1 c=darkblue h=2.5 f=swissb? SAS/Graph c=darkred h=3.0 f=swissbi GPLOT Example;???axis1 label=(c=darkorange h=1.5 f=zapfbi j=r Total Returns) offset=(0.2 in ) order=(0 to 15000 by 5000) value=(c=darkorange f=swissl? );?axis2?label=(c=darkgreen h=1.5? f=zapfbi)order=(0 to 500000 by 50000)value=(f=swissl? c=darkgreen);??symbol1? c=red? h=2? v=# ;symbol2? c=blue h=3? v=diamond;?proc gplot data=sashelp.shoes;where Region in(United States,Eastern Europe);plot Returns * Sales=Region /?? vaxis=axis1? haxis=axis2 autohref? lhref=2 chref=lime autovref? lvref=5 cvref=pink caxis=blue?? ctext=red ; run;结果:?我们还可以设置这些Symbol是
您可能关注的文档
- Love is a Fallacy 2.ppt
- M1 Unit5 reading Nelson Mandela-a modern hero.ppt
- M2 Period 3.ppt
- M10 U1 You should tidy your toys的链接动画.ppt
- M4U3project2.ppt
- MAKE+A+CUP+CAKE+K-19+14+28+34+23+44+52+33.ppt
- M9-Friendship-Unit-2-Ibelieve-that-the-world-is-what-you-think-it-is..ppt
- manugistics - transportaiton routing.ppt
- Mach Conesin a PerturbativeQuark-Gluon Plasma.ppt
- M5U1 Word power 公开课(牛津版).ppt
最近下载
- 专题13.4 线段的垂直平分线的判定与性质【九大题型】(举一反三)(人教版)(原卷版).docx VIP
- 2016中职对口升学语文复习教案:文言文03.doc
- 全国职业院校技能大赛高职组(商务数据分析赛项)备赛试题及答案.doc VIP
- 自愈力饮食法读书札记.docx VIP
- 校准品溯源-课件.pptx
- 六年级语文上册教材解读省公开课获奖课件说课比赛一等奖课件.pptx
- 人音版五年级上册第五单元第2课时《故乡的小路》课件.pptx
- 【技能大赛】《商务数据分析》赛项赛题及答案(第5套) .pdf VIP
- 2023年人教版数学五年级上册全套练习册含答案.doc
- 《医学影像设备学》DR数字X线摄影系统.ppt
文档评论(0)