<?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: A vbar chart with count of subgroups in columns/variables in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/A-vbar-chart-with-count-of-subgroups-in-columns-variables/m-p/200040#M7456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use SGPANEL and draw two panels, one for SEX="M" and other to SEX="F" and group intake, or vice versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other alternative could be generate a category variable with all your categories joined, such as A1Z and B2X for example and use this to plot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 06:05:53 GMT</pubDate>
    <dc:creator>arodriguez</dc:creator>
    <dc:date>2015-08-17T06:05:53Z</dc:date>
    <item>
      <title>A vbar chart with count of subgroups in columns/variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/A-vbar-chart-with-count-of-subgroups-in-columns-variables/m-p/200039#M7455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This has to be very easy, but I am really stuck and unable to solve it easily.&lt;/P&gt;&lt;P&gt;Imagine having a table that looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="330" style="border: 1px solid rgb(0, 0, 0); width: 489px; height: 332px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Person&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sex&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Intake&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Exercise&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Output&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;M&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;M&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;M&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;M&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;M&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on, so the first column is incremental, the other columns contain binary data &lt;/P&gt;&lt;P&gt;Let us say I want to produce a bar chart with three bars (the count of A in intake, the count of 1 in Exercise, the count of Z in Output)&lt;/P&gt;&lt;P&gt;and then another bar chart showing the same thing as the first chart but subgroubed by sex, ie for each one of the three groups (intake, exercise, output) two bars are shown beside each other, one for male and one for female sex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SGplot dose that very easily (with the group=sex groupdisplay=cluster), but i am not sure how to get the counts of the respective groups&lt;/P&gt;&lt;P&gt;Is there an easy way or will I have to use a proc sql to count the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;A in intake, the count of 1 in Exercise, the count of Z in Output?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Aug 2015 17:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/A-vbar-chart-with-count-of-subgroups-in-columns-variables/m-p/200039#M7455</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2015-08-16T17:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: A vbar chart with count of subgroups in columns/variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/A-vbar-chart-with-count-of-subgroups-in-columns-variables/m-p/200040#M7456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use SGPANEL and draw two panels, one for SEX="M" and other to SEX="F" and group intake, or vice versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other alternative could be generate a category variable with all your categories joined, such as A1Z and B2X for example and use this to plot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 06:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/A-vbar-chart-with-count-of-subgroups-in-columns-variables/m-p/200040#M7456</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2015-08-17T06:05:53Z</dc:date>
    </item>
  </channel>
</rss>

