<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: create a clustered bar chart using multiple variables in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358783#M12486</link>
    <description>&lt;P&gt;Hi Bruno_sas and all,&lt;/P&gt;
&lt;P&gt;I tried to look up for the XAXISTABLE to add information to the x-axis and I wasn't abe to get any.&lt;/P&gt;
&lt;P&gt;(1) I need to add the total number of people represented in each category on the x-axis in parentheses.&lt;/P&gt;
&lt;P&gt;(2) Also, how do I change the layout to landscapeso so&amp;nbsp;I can add the&amp;nbsp;'N' below&amp;nbsp;each x-axis&amp;nbsp;category&amp;nbsp;as the chart is wide and the category labels are all slanting.&lt;/P&gt;
&lt;P&gt;(3) I also want to&amp;nbsp;rename the legend lables&amp;nbsp; and the x-axis category labels.&lt;/P&gt;
&lt;P&gt;(4) Is there a way to get rid of the box boder of the chart.&lt;/P&gt;
&lt;P&gt;I tried looking in options and was unable to locate the same. Please advise.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sgplot&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=figure3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noborder&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;vbar&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xValue / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;group&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=groupValue &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;groupdisplay&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=cluster &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;response&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=value &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;grouporder&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=data ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;yaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;values&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; to &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; by &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Proportion XXXXX(%)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;values&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=( &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_one"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_two"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_three"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_four"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(nolabel);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;keylegend&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;location&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=outside &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;position&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=right &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noborder&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;title&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;" "&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2017 16:23:05 GMT</pubDate>
    <dc:creator>dr2014</dc:creator>
    <dc:date>2017-05-15T16:23:05Z</dc:date>
    <item>
      <title>create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358657#M12473</link>
      <description>&lt;P&gt;Hi, I am a beginner at SAS/GRAPH and I need to create a clustered bar graph. Below is&amp;nbsp;the data. I have been looking at codes, but I am not able to understand how to represent the below values in the code. I was looking at proc sgplot. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="415" dir="LTR" border="1" cellspacing="1" cellpadding="7"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="23%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;Time_periods&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;Total&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;A&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;B&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;C&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;D&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;Time_one&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;4304&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;68.61&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;83.02&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;53.72&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;32.99&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;Time_two&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;75743&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;61.16&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;83.02&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;56.86&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;30.30&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;Time_three&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;8965&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;64.08&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;86.79&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;58.39&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;25.41&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23%" height="20" valign="BOTTOM"&gt;
&lt;P align="LEFT"&gt;&lt;FONT face="Calibri" size="3"&gt;Time_four&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;4824&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;65.78&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;86.53&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;57.36&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="15%" height="20" valign="BOTTOM"&gt;
&lt;P align="RIGHT"&gt;&lt;FONT face="Calibri" size="3"&gt;28.86&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;I am not able to copy-paste the chart from excel, so I have a document for reference to the figure. I basically need the intervals&amp;nbsp; on the x-axis and the variables A, B, C and D represented in each time_periods. The y-axis is upto value of 100%. The values in A, B, C and D are in percents. I need these color coded.&amp;nbsp;I also need the totals provided by the variable 'Total' displayed below each interval. Please advise as soon as possible. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 06:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358657#M12473</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-15T06:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358664#M12474</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the graph as in the document attached, you can use the code below. However it is not clear what "Total" actually displays.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards;
  input 
Time_periods : $32. Total 
A B C D
;
cards;
Time_one 4304 68.61 83.02 53.72 32.99
Time_two 75743 61.16 83.02 56.86 30.30
Time_three 8965 64.08 86.79 58.39 25.41
Time_four 4824 65.78 86.53 57.36 28.86 
;

data want;
  set have;
  array colValues{*} total a b c d;
  do i = 1 to dim(colValues);
    xValue = vname( colValues{i} );
    groupValue = time_periods;
    value = colValues{i};
    output;
  end;
  keep xValue groupValue value;
run;

proc sgplot data=want noborder;
  vbar xValue / group=groupValue groupdisplay=cluster response=value grouporder=data ;
  yaxis values=(0 to 100 by 10) display=(nolabel);
  xaxis values=("Total" "A" "B" "C" "D") display=(nolabel);

  keylegend / location=outside position=right noborder title=" ";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need something else please provide an example on what the graph should look like. Also the number do not add up to a 100%&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 07:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358664#M12474</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-05-15T07:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358696#M12477</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32"&gt;@BrunoMueller&lt;/a&gt;, thanks I will try it. Also,the 'total' variable is the number of people in the time_period that needs to displayed on the x-axis under each clustered bars for its respective time_period. I was unable to coy-paste the chart on the post. For some reason it didn't allow me to do it. So i attached an excel sheet for the same. Are you able to open it? Please let me know.</description>
      <pubDate>Mon, 15 May 2017 10:55:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358696#M12477</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-15T10:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358697#M12478</link>
      <description>Yes, the numbers do not add up to 100% because it excludes the 'missing' category during calculations.</description>
      <pubDate>Mon, 15 May 2017 10:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358697#M12478</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-15T10:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358702#M12480</link>
      <description>&lt;P&gt;&lt;A href="https://image.slidesharecdn.com/unit8presentingdatainchartsgraphsandtables-141121043601-conversion-gate01/95/unit-8-presenting-data-in-charts-graphs-and-tables-16-638.jpg?cb=1416544642" target="_self"&gt;https://image.slidesharecdn.com/unit8presentingdatainchartsgraphsandtables-141121043601-conversion-gate01/95/unit-8-presenting-data-in-charts-graphs-and-tables-16-638.jpg?cb=1416544642&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of the chart I need. I tried copy-pasting but again it doesnt work. In the link on the x-axis , I would like to display the total number of people represented by the variable 'total' in my example data. Is there a way to do it? Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 11:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358702#M12480</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-15T11:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358749#M12484</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;just remove the total variable from the ARRAY statement, and you get the graph you need. In the data provided, you only have one total value related to Time_one, Time_two etc., but you need it for A,B etc. so the data has to be changed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One can use the XAXISTABLE to add addional information below the X axis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding images is realy easy, as long as you have an image in the clipboard, just use Ctrl-V to insert the image. As an alternative you can use "Insert/edit Image" tool in the editor to insert saved images.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 13:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358749#M12484</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-05-15T13:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358762#M12485</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32"&gt;@BrunoMueller&lt;/a&gt;. I got the chart I needed.&amp;nbsp;&amp;nbsp;However, &amp;nbsp;I realized I had it the&amp;nbsp;other way round&amp;nbsp;in the excel sheet. i.e I needed the time_period on the x-axis.&amp;nbsp; I made the necessary changes to the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So thats the reason I need the 'Total' for each time_period displayed below the label in parentheses. I will check out the XAXISTABLE for it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how can change the name of the labels on the x-axis and legend? Do I have to accomplish it by renaming before the array or is there&amp;nbsp;a way to accomplish it on proc sgplot? Any leads would be&amp;nbsp; helpful as time is short.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and for the tip on attaching the charts.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 14:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358762#M12485</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-15T14:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358783#M12486</link>
      <description>&lt;P&gt;Hi Bruno_sas and all,&lt;/P&gt;
&lt;P&gt;I tried to look up for the XAXISTABLE to add information to the x-axis and I wasn't abe to get any.&lt;/P&gt;
&lt;P&gt;(1) I need to add the total number of people represented in each category on the x-axis in parentheses.&lt;/P&gt;
&lt;P&gt;(2) Also, how do I change the layout to landscapeso so&amp;nbsp;I can add the&amp;nbsp;'N' below&amp;nbsp;each x-axis&amp;nbsp;category&amp;nbsp;as the chart is wide and the category labels are all slanting.&lt;/P&gt;
&lt;P&gt;(3) I also want to&amp;nbsp;rename the legend lables&amp;nbsp; and the x-axis category labels.&lt;/P&gt;
&lt;P&gt;(4) Is there a way to get rid of the box boder of the chart.&lt;/P&gt;
&lt;P&gt;I tried looking in options and was unable to locate the same. Please advise.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sgplot&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=figure3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noborder&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;vbar&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xValue / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;group&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=groupValue &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;groupdisplay&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=cluster &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;response&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=value &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;grouporder&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=data ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;yaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;values&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; to &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; by &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Proportion XXXXX(%)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;values&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=( &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_one"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_two"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_three"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"Time_four"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(nolabel);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;keylegend&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;location&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=outside &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;position&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=right &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noborder&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;title&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;" "&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 16:23:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358783#M12486</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-15T16:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358796#M12487</link>
      <description>&lt;P&gt;Using Bruno's code, I modified it to use a "barparm" instead of a "bar", since there was no summarization involved. This change gives you some extra flexibility for overlay types and variable combinations. I also changed the orientation, as the bars are too close together to display the values in a vertical orientation. I used a custom format to change your legend values. You can do the same thing for your axis value, or use the VALUESDISPLAY option. This might not be exactly what you want, but it should give you some ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;BR /&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards;
  input
Time_periods : $32. Total
A B C D
;
cards;
Time_one 4304 68.61 83.02 53.72 32.99
Time_two 75743 61.16 83.02 56.86 30.30
Time_three 8965 64.08 86.79 58.39 25.41
Time_four 4824 65.78 86.53 57.36 28.86
;

data want;
  set have;
  array colValues{*} total a b c d;
  do i = 1 to dim(colValues);
    xValue = vname( colValues{i} );
    groupValue = time_periods;
    value = colValues{i};
    output;
  end;
  keep xValue groupValue value;
run;

proc format;
 value $custom_legend "Time_one"="custom 1"
                      "Time_two"="custom 2"
                      "Time_three"="custom 3"
                      "Time_four"="custom 4";
run;

ods graphics / noborder;
proc sgplot data=want noborder;
  format groupValue $custom_legend.;
  xaxis values=(0 to 100 by 10) display=(nolabel);
  yaxis values=("Total" "A" "B" "C" "D") display=(nolabel);
  hbarparm category=xValue response=value / group=groupValue groupdisplay=cluster grouporder=data ;
  yaxistable value / class=groupValue classdisplay=cluster;
  keylegend / location=outside noborder title=" ";
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 May 2017 17:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358796#M12487</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-05-15T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: create a clustered bar chart using multiple variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358808#M12489</link>
      <description>Hi DanH_sas, thank you I tried it and I can understand its value. I will definitely remember to use it, but now I am required to display the chart in the previous manner. Also any help on displaying the 'N; below the time periods would be appreciated!</description>
      <pubDate>Mon, 15 May 2017 18:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/m-p/358808#M12489</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2017-05-15T18:07:26Z</dc:date>
    </item>
  </channel>
</rss>

