楼主: moyunzheng
5759 6

[原创博文] sgplot画多条序列图 [推广有奖]

  • 1关注
  • 2粉丝

博士生

60%

还不是VIP/贵宾

-

威望
0
论坛币
1357 个
通用积分
4.3535
学术水平
18 点
热心指数
19 点
信用等级
17 点
经验
11986 点
帖子
240
精华
0
在线时间
361 小时
注册时间
2010-12-11
最后登录
2025-12-2

楼主
moyunzheng 发表于 2011-9-24 20:42:56 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
数据集temp中有变量 date,x1,x2,...y8;
用gplot同时画序列图
proc gplot data=temp;
plot (x1--y8)*deathdate;
run;


请问用sgplot如何实现?
二维码

扫码加我 拉你入群

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

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

关键词:sgplot gplot plot GPL Death 如何

沙发
yugao1986 发表于 2011-9-24 22:15:23
貌似timeseries也可以解决,例如:
proc sort data=sashelp.stocks out=stocks;
by date;run;
ods graphics on;
proc timeseries data=stocks out=nstock plot=(series);
   id date interval=day accumulate=median;
   var open high low close;
run;
ods graphics off;
三人行必有我师

藤椅
bobguy 发表于 2011-9-25 10:09:07
See the example below . It plots 4 graphs together.

data test;
    do x=-4 to 4 by 0.1;
        pdf1=pdf('normal',x);
                pdf2=pdf('normal',x, 0.2, 1.2);
        cdf1=cdf('normal',x);
                cdf2=cdf('normal',x, 0.2, 1.2);
        output;
    end;
run;

symbol1 c=red v=none i=spline ;
symbol2 c=year v=none i=spline;
symbol2 c=green v=none i=spline;
symbol2 c=blue v=none i=spline;

title "normal pdf and cdf";
proc sgplot data=test ;

    series x=x y=pdf1;
        series x=x y=pdf2;
        series x=x y=cdf1/y2axis;
        series x=x y=cdf2/y2axis;
run;
quit;

板凳
shenliang_111 发表于 2014-1-6 18:53:52
bobguy 发表于 2011-9-25 10:09
See the example below . It plots 4 graphs together.

data test;
如何梗概series(即x)的横坐标刻度?

报纸
linggol 发表于 2014-1-6 22:49:08
data test;
     do x=-4 to 4 by 0.1;
         pdf1=pdf('normal',x);
                 pdf2=pdf('normal',x, 0.2, 1.2);
         cdf1=cdf('normal',x);
                 cdf2=cdf('normal',x, 0.2, 1.2);
         output;
     end;
run;

symbol1 c=red v=none i=spline ;
symbol2 c=year v=none i=spline;
symbol2 c=green v=none i=spline;
symbol2 c=blue v=none i=spline;

title "normal pdf and cdf";
proc sgplot data=test ;

    series x=x y=pdf1;
         series x=x y=pdf2;
         series x=x y=cdf1/y2axis;
         series x=x y=cdf2/y2axis;
yaxis  values=(0 to 0.5 by 0.05) grid;
   xaxis  values=(-4 to 4 by 0.5) grid;


run;
quit;
已有 2 人评分学术水平 热心指数 信用等级 收起 理由
xncdww + 1 + 1 + 1 精彩帖子
shenliang_111 + 1 + 1 + 1 精彩帖子

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

地板
linggol 发表于 2014-1-6 22:49:30
你试试

7
48753147 发表于 2014-1-8 16:54:26
用sgpanel試看

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-1 17:43