楼主: mmume
1003 1

[SAS] 基于SAS9.3的经济学人风格图(含代码) [推广有奖]

  • 1关注
  • 1粉丝

初中生

19%

还不是VIP/贵宾

-

威望
0
论坛币
278 个
通用积分
0
学术水平
17 点
热心指数
17 点
信用等级
17 点
经验
231 点
帖子
10
精华
0
在线时间
9 小时
注册时间
2010-7-10
最后登录
2016-6-3

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

123.jpg



说明:这是闲着没事做的经济学人风格系列图之一,分享一个给大家,如有转载请注明出处,以下源代码只能SAS9.3及以上才能使用!

  1. /*---------------------------------------------------------*\
  2. Name: Foreigntradecooperation.sas
  3. Title:China's overseas contracted projects
  4. Author::WenYi  Email:dear&mmu.me
  5. From:http://www.**.com/group/sasfinance/
  6. Created:2012/06/26 SAS9.3
  7. \*---------------------------------------------------------*/
  8. ods listing close;
  9. ods html file='mbar.html' path='.' ;
  10. ods graphics/reset width=600px height=480px imagename='Foreigntradecooperation' imagefmt=png;
  11. title j=left color=black height=2 font=arialblack " China's overseas contracted projects";
  12. title2 j=left color=black font=arial 'The value of newly-signed contracts';
  13. footnote justify=left color=cx7e96c2 'Source:Ministry Of Commerce,PRC' justify=right color=cx7e96c2 'Graph by WenYi' ;
  14. data squares;
  15. infile datalines dlm='#';
  16. length fillcolor $ 9
  17. display $ 9
  18. function $ 12
  19. linecolor $ 9;
  20. input function $ x1 y1 width height fillcolor linecolor display;
  21. datalines;
  22. rectangle # 0 # 113 # 5#10 # cxd5272b # cxd5272b #all
  23. ;
  24. run;
  25. data work.contract;
  26. input t yymmn6. dd tb;
  27. cards;
  28. 201008        143.8        128.2539683
  29. 201009        70.6        29.06764168
  30. 201010        141.4        13.30128205
  31. 201011        141.8        122.9559748
  32. 201012        241        22.39715592
  33. 201101        103.9        -25.78571429
  34. 201102        73.7        56.80851064
  35. 201103        131.9        68.67007673
  36. 201104        127.1        25.59288538
  37. 201105        123.2        39.84108967
  38. 201106        102.1        7.586933614
  39. 201107        95.8        71.07142857
  40. 201108        84        -41.58553547
  41. 201109        89.5        26.77053824
  42. 201110        114.5        -19.02404526
  43. 201111        95.5        -32.651622
  44. 201112        282.1        17.05394191
  45. 201201        93.3        -10.20211742
  46. 201202        51.5        -30.12211669
  47. 201203        152.8        15.84533738
  48. 201204        55.8        -56.09756098
  49. 201205        85.2        -30.84415584
  50. ;
  51. run;
  52. proc sgplot data=work.contract sganno=squares;
  53. vbar t/response=dd barwidth=0.3 fill fillattrs=(color=cx349cdf) legendlabel='Contracts,billions of dollars';
  54. vline t /response=tb markers y2axis limits=both lineattrs=(color=cx86351c thickness=3) markerattrs=(color=cx86351c size=3) legendlabel='%change year on year';
  55. format t mmyy5.;
  56. xaxis display=(nolabel);
  57. yaxis values=(0 to 300 by 50) display=(nolabel) valueattrs=(color=cx349cdf weight=bold);
  58. y2axis values=(-100 to 200 by 50) display=(nolabel) grid minor valueattrs=(color=cx86351c weight=bold);
  59. keylegend / noborder down=1 location=outside position=topleft valueattrs=(color=black size=11 style=italic weight=normal);
  60. run;
  61. quit;
  62. ods html close;
  63. ods listing;
复制代码

二维码

扫码加我 拉你入群

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

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

关键词:经济学人风格图 经济学人 SAS9 经济学 COOPERATION 风格 经济学人风格图 sas

已有 2 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
xddlovejiao1314 + 100 + 100 + 5 + 5 + 5 精彩帖子
niuniuyiwan + 60 + 60 + 5 + 5 + 5 精彩帖子

总评分: 经验 + 160  论坛币 + 160  学术水平 + 10  热心指数 + 10  信用等级 + 10   查看全部评分

本帖被以下文库推荐

沙发
xddlovejiao1314 学生认证  发表于 2015-10-13 08:42:13 |只看作者 |坛友微信交流群
谢谢分享。
已有 1 人评分论坛币 热心指数 收起 理由
niuniuyiwan + 10 + 1 精彩帖子

总评分: 论坛币 + 10  热心指数 + 1   查看全部评分

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

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

GMT+8, 2024-5-1 00:22