<?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: Bar chart with a group and subgroup? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/669065#M20201</link>
    <description>Can you use SGPANEL for it?&lt;BR /&gt;Otherwise I think this falls into the custom graphs which means going down the GTL route.</description>
    <pubDate>Tue, 14 Jul 2020 02:31:46 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-07-14T02:31:46Z</dc:date>
    <item>
      <title>Bar chart with a group and subgroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/669034#M20200</link>
      <description>&lt;P&gt;I have limited graphing experience, but keen for some help on creating a wide bar chart with two groups, by YrMth and then by Category. Each category has 3 types, which will represent a bar. I had a look at this&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/create-a-clustered-bar-chart-using-multiple-variables/td-p/358657" target="_self"&gt;question&lt;/A&gt;&amp;nbsp;which is similar although not quite what I need.&lt;/P&gt;
&lt;DIV id="tinyMceEditorsustagens_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Here is some sample data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards;
  input 
YrMth
Category : $32.  
Type : $32.
Amount
;
cards;
202004 Single End 68.61
202004 Single Avg 83.02
202004 Single Profit 56.86
202004 Duplex End 61.16
202004 Duplex Avg 53.72
202004 Duplex Profit 86.79
202004 Condo End 64.08
202004 Condo Avg 32.99
202004 Condo Profit 64.08
202005 Single End 68.61
202005 Single Avg 83.02
202005 Single Profit 56.86
202005 Duplex End 61.16
202005 Duplex Avg 53.72
202005 Duplex Profit 86.79
202005 Condo End 64.08
202005 Condo Avg 32.99
202005 Condo Profit 64.08
202006 Single End 68.61
202006 Single Avg 83.02
202006 Single Profit 56.86
202006 Duplex End 61.16
202006 Duplex Avg 53.72
202006 Duplex Profit 86.79
202006 Condo End 64.08
202006 Condo Avg 32.99
202006 Condo Profit 64.08
202007 Single End 68.61
202007 Single Avg 83.02
202007 Single Profit 56.86
202007 Duplex End 61.16
202007 Duplex Avg 53.72
202007 Duplex Profit 86.79
202007 Condo End 64.08
202007 Condo Avg 32.99
202007 Condo Profit 64.08
;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What I have:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=have noborder;
  vbar Category / group=Type groupdisplay=cluster response=amount grouporder=data ;
  yaxis values=(0 to 100 by 10) display=(nolabel);
  xaxis values=("Single" "Duplex" "Condo") display=(nolabel);

  keylegend / location=outside position=right noborder title=" ";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What I want to achieve:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47109i9CA02A2C302361AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorsustagens_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Jul 2020 01:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/669034#M20200</guid>
      <dc:creator>sustagens</dc:creator>
      <dc:date>2020-07-14T01:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with a group and subgroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/669065#M20201</link>
      <description>Can you use SGPANEL for it?&lt;BR /&gt;Otherwise I think this falls into the custom graphs which means going down the GTL route.</description>
      <pubDate>Tue, 14 Jul 2020 02:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/669065#M20201</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-14T02:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with a group and subgroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/669280#M20202</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=have ;
  panelby YrMth; /* OPTIONAL: control layout options */
  vbar Category / group=Type groupdisplay=cluster response=amount grouporder=data ;
  rowaxis values=(0 to 100 by 10) display=(nolabel);
  colaxis values=("Single" "Duplex" "Condo") display=(nolabel);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jul 2020 19:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/669280#M20202</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-07-14T19:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with a group and subgroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/670552#M20234</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sgpanel data=have ;
  panelby YrMth / onepanel layout=columnlattice colheaderpos=bottom noborder novarname; 
  vbar Category / group=Type groupdisplay=cluster response=amount grouporder=data ;
  rowaxis display=(nolabel);
  colaxis display=(nolabel);   
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Untitled.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47310i5C556E324829EC7B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 03:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-a-group-and-subgroup/m-p/670552#M20234</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-07-20T03:13:19Z</dc:date>
    </item>
  </channel>
</rss>

