将单独的图形列在同一张图上---ODS
2011-10-18 16:36
113 查看
FROM<Multiple Graphs on One page, the easy way (PDF) and the hard way (RTF>
样本数据:
作图:
ods layout
样本数据:
data spiral; do theta=1 to 1080 by .1; r=.75 + sin((.25*theta)); x=r*cos(theta); y=r*sin(theta); output; end; run; data star; do theta=1 to 1080 by .75; r=sin((5)*theta); x=r*cos(theta); y=r*sin(theta); output; end; run; data colors; do theta=1 to 5760 by 1; r=sin((sqrt(3/2))*theta); x=r*cos(theta); y=r*sin(theta); z=(round(rannor(0),.01)); if abs(z) gt 1 then z=1-abs(z); output; end; run; %macro fixsymbols; %*Used to set symbol definitions for all 99 symbols, which will be used to make the multicolor graph below; goptions reset=all ;*used color and symbol definitions above,return to default before modifying here; %do i=1 %to 99; symbol&i height=.5 v=dot i=join line=35; %end; %mend; %fixsymbols; data rose; do theta=1 to 360 by .5; r=sin((9/2)*theta); x=r*cos(theta); y=r*sin(theta); output; end; run;
作图:
goptions reset=all device=pdfc ftext="swissb"; ods pdf file='C:\temp\four in one.pdf' startpage=never; ods proclabel "Four graphs on one page" ; goptions hsize=5.20 in vsize=3.75 in; title1; proc gplot data=spiral; goptions horigin=0in vorigin=3.99 in; title2 'PLOT #1-A spiral'; plot y*x /name="Spiral" noaxes nolegend noframe; symbol1 interpol=join width=10 ci=cxEC8B16 cv=cx546EF0 font=swiss value=-; run; quit; Proc gplot data=star; goptions horigin=5.25; title2 'PLOT #2-A star'; plot y*x /nolegend noaxes name="star" noframe; symbol1 interpol=join width=10 ci=cxEC8B16 cv=cx546EF0 font=swiss value=-; run; quit; %fixsymbols; proc gplot data=colors; goptions hsize= 5.20in vsize= 3.75in device=pdfc ftext="swissb" horigin=0 in vorigin=0 in ; *Need the above goptions because of the reset=all in the Macro fixsymbols; title2 'PLOT #3-Multicolor "thing"'; plot y*x=Z / name="Colors" nolegend noaxes noframe; run; quit; proc gplot data=rose; goptions horigin=5.25 in; title2 'PLOT #4-A rose'; plot y*x / name="Rose" noframe nolegend noaxes; symbol1 interpol=join width=10 ci=cxC01C6E cv=cxA7398A font=swiss value=-; run; quit; ods pdf close;
ods layout
Filename odsout ‘c:\’; title2"Absolute layout"; ods pdf body=”Absolute.pdf" ; ods layout Start width=10in height=8in ; ods region x=0 y=0 width=40% height=40%; proc gplot data=test; title2 'PLOT #1'; plot y*x /name="hany1" noframe; run; ods region x=50% y=0 width=40% height=40%; title2 'PLOT #2'; plot y*x /name="hany2" noframe; run; ods region x=0 y=50% width=40% height=40%; title2 'PLOT #3'; plot y*x / name="hany3" noframe; run; ods region x=50% Y=50% width=40% height=40%; title2 'PLOT #4'; plot y*x / name="hany4" noframe; run; quit; ods layout end; ods pdf close;
相关文章推荐
- 利用ODS和Basic GOPTIONS将表格和多个图形列在一张纸上(转)
- xtrabackup迁移单独一张INNODB表
- 【知识库】为什么把占空间的字段单独存一张表--mysql表设计(146)
- 15 继承(二)(每个子类扩展的属性单独保存在一张表中)
- RHEL7单独安装图形X11
- informix单独导出和导入一张表
- xtrabackup迁移单独一张INNODB表
- 一本需要购买的图形学方面的好书:GPU精粹——实时图形编程的技术、技巧和技艺(附CD-ROM光盘一张)
- 使用matplotlib绘制多个图形单独显示
- xtrabackup迁移单独一张InnoDB表到远程服务器【MySQL5.6】
- 继承结构中每个子类单独一张表
- Yii2单独验证图形验证码
- RHEL7 单独安装图形 X11
- 从整库逻辑备份单独抽出一张表
- Python使用matplotlib绘制多个图形单独显示的方法示例
- RedHat Server 7 单独安装图形系统 X11
- SAS ODS 过程输出图形
- Android图形显示系统——一张图片的显示流程
- 从xtraback 备份文件中 单独恢复一张 innodb 表