请选择 进入手机版 | 继续访问电脑版
楼主: davil2000
14566 78

[程序分享] 基于SAS/GRAPH绘制动画雪景图   [推广有奖]

院士

98%

还不是VIP/贵宾

-

TA的文库  其他...

☆大数据时代文库☆

威望
4
论坛币
29697 个
通用积分
13.2245
学术水平
1172 点
热心指数
1121 点
信用等级
1143 点
经验
96671 点
帖子
2695
精华
19
在线时间
3003 小时
注册时间
2004-10-31
最后登录
2022-6-10

davil2000 发表于 2012-11-21 11:23:48 |显示全部楼层 |坛友微信交流群
相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

/*基于SAS/GRAPH绘制动画雪景图*/
/* assign the destination for current directory */

x 'cd d:\docs';
filename out 'test1.gif';
/* set the graphics environment and assign the */
/* appropriategraphics options for the animation */

goptions reset=all    device=gifanim    gsfname=out
    gsfmode=replace    iteration=0    delay=80    ftext=swissb
    cback=SkyBlue    ctext=navy    htext=1;

%let n=100;

/* number of patients = number of random numbers */
/* create data sets for the sequence of graphs   */

data a;
do i=1 to &n;
        x=3+rannor(345);
        y=pdf('PARETO',x,.5,1);
        output;
end;
run;


data b; set a;
do k=1 to &n+1-i;
        l=&n+1-k;
        output;
end;
run;

proc sort data=b; by l; run;

data c;   set b;    by l;
z=0;    w=1;    output;
z=0;    w=2;    output;
z=0;    w=3;    output;
run;


proc sort data=c; by l w; run;

data d; set c;
if i=l and w=1 then z=y*2;
if i=l and w=2 then z=y;
run;

data test;
do x=0 to 7 by .1;
        z1=pdf('PARETO',x,.5,1);
        output;
end;
run;


data test1; set test;
do l=1 to &n;
        do w=1 to 3;
        output;
        end;
end;
run;

data plot; set test1 d; run;


proc sort data=plot; by l w; run;
/*The following code sets the symbol statements for the graphs and uses */
/*proc gplot to produce the plots to be animated by GIFANIM driver */

symbol1 color=green i=join w=5 l=45;
symbol2 font=marker value=T color=Snow h=3;
axis1 order=(0 to .5 by .1) offset=(1,1) minor=(number=1) label=none ;
axis2 order=(0 to 7 by 1) offset=(1,1) minor=(number=1) label=none ;


/*VALUE=special-symbol specifies a plot symbol for the data points */
proc gplot data=plot uniform;
plot z1*x=1 z*x=2/vaxis=axis1 haxis=axis2 overlay CFRAME=SkyBlue
                                    vref=.1 to .4 by .1    lvref=2
                                    href= 1 to  6 by     1    lhref=2 nolegend ;
by l w;
run; quit;

/* end the animation */
data _null_;
file out recfm=n mod;  put '3B'x;
run;

/*disassociates the currently assigned filerefs*/
filename out clear;

test1.gif



/* 瑞雪兆丰年 */
/*
看官,请点击帖子左下角的“评分”给点鼓励吧! */

二维码

扫码加我 拉你入群

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

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

关键词:GRAPH GRAP RAP APH appropriate 动画

已有 33 人评分经验 威望 论坛币 学术水平 热心指数 信用等级 收起 理由
congmu + 1 + 1 + 1 厉害
8848sovereign + 1 精彩帖子
漫思wen茶 + 1 + 1 + 1 精彩帖子
迈向人大 + 1 + 1 + 1 精彩帖子
jianbamail + 1 精彩帖子
a6566792 + 1 + 1 + 1 精彩帖子
夏之鹭江 + 1 + 1 + 1 精彩帖子
tailezhu2007 + 1 + 1 + 1 精彩帖子
zhentao + 1 + 1 + 1 了不起。里面有很多应用啊。好好学习了。
ranyuzhe + 1 精彩帖子

总评分: 经验 + 280  威望 + 1  论坛币 + 160  学术水平 + 56  热心指数 + 52  信用等级 + 50   查看全部评分

本帖被以下文库推荐

R是万能的,SAS是不可战胜的!
ziyenano 发表于 2012-11-21 11:32:12 |显示全部楼层 |坛友微信交流群
最近都很有娱乐精神呐!

使用道具

瀚海星云 发表于 2012-11-21 13:38:27 |显示全部楼层 |坛友微信交流群
支持 能画海贼王吗

使用道具

admin 企业认证  发表于 2012-11-21 13:59:59 |显示全部楼层 |坛友微信交流群
附件图片太大,可以做小一点kb,不然看不到

使用道具

rongyun5460 在职认证  发表于 2012-11-21 14:21:04 |显示全部楼层 |坛友微信交流群
啥东东呢,看不到呀

使用道具

若水烟寒 发表于 2012-11-21 14:39:25 |显示全部楼层 |坛友微信交流群
有意思~~赞一个!!!

使用道具

xiaojiabei 发表于 2012-11-21 14:42:46 |显示全部楼层 |坛友微信交流群
超级喜欢
开心是我的宗旨

使用道具

ziyenano 发表于 2012-11-21 14:45:24 |显示全部楼层 |坛友微信交流群
data _null_;
file out recfm=n mod;
put '3B'x;
run;
大牛,能否请教一下这一段的意思?

使用道具

davil2000 发表于 2012-11-21 15:22:20 |显示全部楼层 |坛友微信交流群
ziyenano 发表于 2012-11-21 14:45
data _null_;
file out recfm=n mod;
put '3B'x;
In the file statement, the 'out' option is the reference of the graph file,  the 'RECFM=N' option indicates binary format and causes the file to be treated as a byte stream s/t we can control the record format,  and 'MOD' option specifies that output should be appended to an existing file.
Besides, in the put statemet,  '3B'x  is a kind of hexadecimal notation.
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
ziyenano + 1 + 1 + 1 精彩帖子

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

R是万能的,SAS是不可战胜的!

使用道具

ziyenano 发表于 2012-11-21 15:24:48 |显示全部楼层 |坛友微信交流群
davil2000 发表于 2012-11-21 15:22
In the file statement, the 'out' option is the reference of the graph file,  the 'RECFM=N' option  ...
thanks  very much!!!
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
yuzhuyu + 1 + 1 + 1 精彩帖子

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

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-3-28 17:35