楼主: clark3721
1743 3

关于条形图的问题 高手求助! [推广有奖]

  • 0关注
  • 0粉丝

大专生

1%

还不是VIP/贵宾

-

威望
0
论坛币
16 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
536 点
帖子
21
精华
0
在线时间
44 小时
注册时间
2008-12-19
最后登录
2016-11-10

楼主
clark3721 发表于 2011-6-16 09:43:33 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
怎么样不要把属于c的部分叠到a的上面呢,能放到a的边上吗?
二维码

扫码加我 拉你入群

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

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

关键词:高手求助 条形图 怎么样 求助 高手

沙发
honghejing 发表于 2011-6-16 10:00:46
给你一个例子运行一下
ods listing close;
goptions reset=global gunit=pct
         htitle=6 htext=4 ftitle=zapfb ftext=swiss;

  data grainldr;
   length country $ 3 type $ 5;
   input year country $ type $ amount;
   megtons=amount/1000;
   datalines;
1995 BRZ  Wheat    1516
1995 BRZ  Rice     11236
1995 BRZ  Corn     36276
1995 CHN  Wheat    102207
1995 CHN  Rice     185226
1995 CHN  Corn     112331
1995 IND  Wheat    63007
1995 IND  Rice     122372
1995 IND  Corn     9800
1995 INS  Wheat    .
1995 INS  Rice     49860
1995 INS  Corn     8223
1995 USA  Wheat    59494
1995 USA  Rice     7888
1995 USA  Corn     187300
1996 BRZ  Wheat    3302
1996 BRZ  Rice     10035
1996 BRZ  Corn     31975
1996 CHN  Wheat    109000
1996 CHN  Rice     190100
1996 CHN  Corn     119350
1996 IND  Wheat    62620
1996 IND  Rice     120012
1996 IND  Corn     8660
1996 INS  Wheat    .
1996 INS  Rice     51165
1996 INS  Corn     8925
1996 USA  Wheat    62099
1996 USA  Rice     7771
1996 USA  Corn     236064
;

  data newgrain;
     set grainldr;
     length yeardrill typedrill countrydrill $ 40;
     if year=1995 then
        yeardrill='HREF="year95_body.html"';
     else if year=1996 then
        yeardrill='HREF="year96_body.html"';

       if country='BRZ' then
        countrydrill='HREF="country_body.html#country"';
     else if country='CHN' then
        countrydrill='HREF="country_body.html#country1"';
     else if country='IND' then
        countrydrill='HREF="country_body.html#country2"';
     else if country='INS' then
        countrydrill='HREF="country_body.html#country3"';
     else if country='USA' then
        countrydrill='HREF="country_body.html#country4"';

       if type='Corn' then
        typedrill='HREF="type1_body.html"';
     else if type='Rice' then
        typedrill='HREF="type2_body.html"';
     else if type='Wheat' then
        typedrill='HREF="type3_body.html"';
run;

   proc format;
      value $country 'BRZ' = 'Brazil'
                     'CHN' = 'China'
                     'IND' = 'India'
                     'INS' = 'Indonesia'
                     'USA' = 'United States';
run;

   pattern1 color=blue;
pattern2 color=green;
pattern3 color=cyan;

   legend1 label=none
         shape=bar(4,4)
         position=(bottom center)
         offset=(-3);

   goptions transparency device=gif noborder;

   ods html body='grain_body.html'
          frame='grain_frame.html'
          contents='grain_contents.html'
          path=odsout
          nogtitle;

  axis1 label=none value=none;

  axis2 label=(angle=90 'Metric Tons (millions)')
      minor=(n=1)
      order=(0 to 500 by 100)
      offset=(0,0);

  axis3 label=none
      order=('China' 'United States' 'India'
             'Indonesia' 'Brazil')
      split=' ';

  title1 'Corn, Rice, and Wheat Production';
title2 h=2 'Leading Producers for 1995 and 1996';
footnote1 j=l h=3 'click on bars or legend values' j=r h=3 'GRAINALL ';

  proc gchart data=newgrain;
     format country $country.;
     vbar3d year / discrete
                   sumvar=megtons
                   group=country
                   subgroup=year
                   legend=legend1
                   space=0
                   width=4
                   gspace=5
                   maxis=axis1
                   raxis=axis2
                   gaxis=axis3
                   cframe=grayaa
                   coutline=black

                     html=countrydrill
                   html_legend=yeardrill
                   name='grainall'
                   des='Overview of leading grain producers';
run;

quit;

藤椅
6203479170 发表于 2011-6-16 10:03:03
你用EG做的吧?点那个Grouped Colored Vertical Bar就行

板凳
clark3721 发表于 2011-6-16 10:29:38
3# 6203479170
那是什么哦 ,我刚开始学 用的是proc sgplot;

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-9 13:45