全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1722 3
2011-06-16
怎么样不要把属于c的部分叠到a的上面呢,能放到a的边上吗?
二维码

扫码加我 拉你入群

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

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

全部回复
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;
二维码

扫码加我 拉你入群

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

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

2011-6-16 10:03:03
你用EG做的吧?点那个Grouped Colored Vertical Bar就行
二维码

扫码加我 拉你入群

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

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

2011-6-16 10:29:38
3# 6203479170
那是什么哦 ,我刚开始学 用的是proc sgplot;
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群