楼主: qyj8888
4614 8

[原创博文] 【求助】SAS 画图,如何将数值标上去? [推广有奖]

  • 0关注
  • 0粉丝

博士生

67%

还不是VIP/贵宾

-

威望
0
论坛币
999 个
通用积分
0.0600
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1168 点
帖子
182
精华
0
在线时间
406 小时
注册时间
2008-10-20
最后登录
2022-6-8

楼主
qyj8888 发表于 2009-12-29 22:01:41 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
RT,谢谢~~~
二维码

扫码加我 拉你入群

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

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

关键词:如何

回帖推荐

xuwei2007 发表于8楼  查看完整内容

goptions reset=all; proc gplot data=sashelp.air; where year in (1949,1950,1951); plot air*month=year/noframe hminor=0 vminor=0 vaxis=axis1 legend=legend1; symbol1 i=join ci=red v=diamond l=1 h=1.5 pointlabel; symbol2 i=join ci=green v=star l=2 h=1.5; symbol3 i=join ci=yellow v=dot l=3 h=1.5; axis1 label=(a=-90 font='@宋体' c=blue h=3pct '票价(千元)'); legend1 down=3 posit ...

qyj8888 发表于5楼  查看完整内容

试过啦,但是没有达到我想要的效果,可能是我没描述清楚吧,我是想得到在画图时,那些点的值能够标在旁边~~~谢谢!

本帖被以下文库推荐

沙发
jingju11 发表于 2009-12-29 23:02:26
1# qyj8888

It depends. A good example is always better than many words.

  1. data a;
  2. do x = 1 to 10;
  3.   y = int(100*ranuni(1))+1;
  4.   z = mod(y, 3);
  5.   output;
  6. end;
  7. run;
  8. /* Specify POINTLABEL= to label plot points of variable 'Z' */
  9. symbol1 i=j v=dot c=blue pointlabel=(h=1.5 '#z') ;
  10. title1 h=2 f=swissb 'The POINTLABEL Option';
  11. axis1 offset=(4,4) minor=none;
  12. axis2 offset=(2,2) minor=none;
  13. proc gplot data=a;
  14.    plot y * x /  haxis=axis1 vaxis=axis2 noframe;
  15. run;
  16. quit;
  17. /*Of note: This is a convenient but not the best way to label the points. For example, using annotate data.*/
复制代码

藤椅
xuwei2007 发表于 2009-12-30 08:17:37
***** /  value=var   ;

板凳
qyj8888 发表于 2009-12-30 21:52:57
xuwei2007 发表于 2009-12-30 08:17
***** /  value=var   ;
plot  y*x/ value=var;      ?????
这样不行哈

报纸
qyj8888 发表于 2009-12-30 21:56:24
jingju11 发表于 2009-12-29 23:02
1# qyj8888

It depends. A good example is always better than many words.

  1. data a;
  2. do x = 1 to 10;
  3.   y = int(100*ranuni(1))+1;
  4.   z = mod(y, 3);
  5.   output;
  6. end;
  7. run;
  8. /* Specify POINTLABEL= to label plot points of variable 'Z' */
  9. symbol1 i=j v=dot c=blue pointlabel=(h=1.5 '#z') ;
  10. title1 h=2 f=swissb 'The POINTLABEL Option';
  11. axis1 offset=(4,4) minor=none;
  12. axis2 offset=(2,2) minor=none;
  13. proc gplot data=a;
  14.    plot y * x /  haxis=axis1 vaxis=axis2 noframe;
  15. run;
  16. quit;
  17. /*Of note: This is a convenient but not the best way to label the points. For example, using annotate data.*/
复制代码
试过啦,但是没有达到我想要的效果,可能是我没描述清楚吧,我是想得到在画图时,那些点的值能够标在旁边~~~谢谢!

地板
jingju11 发表于 2009-12-30 22:02:14
5# qyj8888

Use annotate dataset to give the explict position for each label point. That takes time.

7
qyj8888 发表于 2009-12-30 22:32:32
jingju11 发表于 2009-12-30 22:02
5# qyj8888

Use annotate dataset to give the explict position for each label point. That takes time.
哦,谢谢~~~

8
xuwei2007 发表于 2009-12-31 08:30:29
goptions reset=all;
proc gplot data=sashelp.air;
  where year in (1949,1950,1951);
  plot air*month=year/noframe hminor=0 vminor=0  vaxis=axis1 legend=legend1;
  symbol1 i=join ci=red v=diamond l=1 h=1.5 pointlabel;
  symbol2 i=join ci=green v=star l=2 h=1.5;
  symbol3 i=join ci=yellow v=dot l=3 h=1.5;
  axis1 label=(a=-90  font='@宋体' c=blue h=3pct '票价(千元)');
  legend1 down=3 position=(top right inside)
          cshadow=black frame value=(f=duplex)
                  label=(f='宋体' h=1.5 '年代');
  title  f='加粗'  h=3pct '不同月份航空的票价';
run;
希望能帮助解决你的问题。
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

9
qyj8888 发表于 2010-1-5 20:40:49
xuwei2007 发表于 2009-12-31 08:30
goptions reset=all;
proc gplot data=sashelp.air;
  where year in (1949,1950,1951);
  plot air*month=year/noframe hminor=0 vminor=0  vaxis=axis1 legend=legend1;
  symbol1 i=join ci=red v=diamond l=1 h=1.5 pointlabel;
  symbol2 i=join ci=green v=star l=2 h=1.5;
  symbol3 i=join ci=yellow v=dot l=3 h=1.5;
  axis1 label=(a=-90  font='@宋体' c=blue h=3pct '票价(千元)');
  legend1 down=3 position=(top right inside)
          cshadow=black frame value=(f=duplex)
                  label=(f='宋体' h=1.5 '年代');
  title  f='加粗'  h=3pct '不同月份航空的票价';
run;
希望能帮助解决你的问题。
恩,谢谢~~达到我的要求啦!

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

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