楼主: feixing0216
1733 8

一个具有挑战性的SAS作图题 [推广有奖]

  • 3关注
  • 1粉丝

已卖:27份资源

博士生

32%

还不是VIP/贵宾

-

威望
0
论坛币
22 个
通用积分
0
学术水平
2 点
热心指数
1 点
信用等级
1 点
经验
9086 点
帖子
204
精华
0
在线时间
276 小时
注册时间
2010-1-16
最后登录
2026-2-3

楼主
feixing0216 在职认证  发表于 2013-5-14 22:01:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
数据A如下:
x   y
1   0.001
2   -0.002
3   0.0015
4    -0.001
5     0
6    0.0008
7    -0.001
8    0.003
9    -0.0025
10    0
问题是做两幅并排靠在一起的图。左边的一幅图为x从1到7的X与Y的平滑直线图。
右边的一幅图为x从8到10的X与Y的平滑直线图。
二维码

扫码加我 拉你入群

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

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

关键词:sas作图 挑战性 在一起

本帖被以下文库推荐

无悔这一生

沙发
zhou.wen 发表于 2013-5-15 09:25:19
I guess it is the same question compared with you last question.
Don't you have found a solution?
if you have installed SAS9.3,submitting the code as follows.
  1. %sgdesign;
复制代码
You will findthat drawing a curve in SAS is such a easy thing.
Practice Is The Best Teacher!

藤椅
playmore 发表于 2013-5-15 10:41:23
zhou.wen 发表于 2013-5-15 09:25
I guess it is the same question compared with you last question.
Don't you have found a solution?
...
这个ODS Graphics Designer确实不错
过去竟然不知道,多谢介绍
playmore邀请您访问ChinaTeX论坛!!!进入ChinaTeX论坛

板凳
playmore 发表于 2013-5-15 10:41:58
用sgpanel应该可以达到目的
lz你在网上搜下
具体怎么写我也不会
playmore邀请您访问ChinaTeX论坛!!!进入ChinaTeX论坛

报纸
ariman911 发表于 2013-5-15 10:56:47
可以利用proc sgpanel
但是你在畫圖先要先分group
另外,你的平滑直線圖是regression的估計嗎?
下面的程式再依自己的需求修改吧
data test;
input x   y;
if x<=7 then group="a";
else group="b";
cards;
1   0.001
2   -0.002
3   0.0015
4    -0.001
5     0
6    0.0008
7    -0.001
8    0.003
9    -0.0025
10    0
;
proc sgpanel ;
panelby group;
reg x=x y=y;
run;
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
zhou.wen + 1 + 1 + 1 热心帮助其他会员

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

地板
milos_luna 发表于 2013-5-15 10:58:34
我用笨办法试了个,不知道行不行:

data one;
                input x y;
                cards;
                1   0.001
                2   -0.002
                3   0.0015
                4    -0.001
                5     0
                6    0.0008
                7    -0.001
                8    0.003
                9    -0.0025
                10    0
                ;
                                                                                        run;


data one;
                set one ;
                if _n_ le 7 then x1 = x;
                else x2 = x;
                                                                                        run;



proc template;
                define statgraph myplot;
                begingraph;
                                entrytitle halign=center 'Test' ;
                                entryfootnote halign=left 'Data Source' ;
                                layout lattice / rowdatarange=data columndatarange=data columns = 2 rowgutter=10 columngutter=10;
                                                layout overlay;
                                                                seriesplot x=x1 y=y / connectorder=xaxis;               
                                                endlayout;
                                                
                                                layout overlay;
                                                                seriesplot x=x2 y=y /  connectorder=xaxis;        
                                                endlayout;
                                endlayout;
                endgraph;
                end;
run;

ods listing close;
ods html style = listing ;
ods graphics / width=1000px;

                proc sgrender data = one
                        template= myplot;
                run;

ods graphics / reset;
ods html close;
ods listing;

7
zhou.wen 发表于 2013-5-15 12:01:43
https://bbs.pinggu.org/thread-2413951-1-1.html
I have written a blog to introduce the sgdesigner,check the link above.
Practice Is The Best Teacher!

8
lengyu23 发表于 2013-7-25 17:50:17
zhou.wen 发表于 2013-5-15 09:25
I guess it is the same question compared with you last question.
Don't you have found a solution?
...
确实

9
shiyishibasui 发表于 2013-8-16 23:01:03
题目好

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-2-5 18:41