<?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: Creating Bar graphs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/771952#M245043</link>
    <description>You may need to create a new variable that has the two levels, NSFASYN and GRADINC into one and then use either PROC FREQ or SGPLOT. &lt;BR /&gt;&lt;BR /&gt;I don't know if there's a way to specify two grouping variables in a single plot in that fashion easily. I think you can if you want to get into proc template or some of the more complex graphing options. I would definitely try the first option. But that also assumes I'm interpreting how you want them graphed correctly. Depending on exactly what you want, SGPANEL with PANELBY NSFASYN may be correct as well.</description>
    <pubDate>Mon, 04 Oct 2021 16:20:29 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-10-04T16:20:29Z</dc:date>
    <item>
      <title>Creating Bar graphs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/771870#M245007</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi there. I am stuck with trying to create a bar graph for 3 categorical variables; quintile (1-3, 4 and 5), nsfasyn(yes, no) and gradind(yes, no). My proc freq statement is as follows:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=project;
tables gradind;
format gradind newh.;
tables quintile;
format quintile new.;
tables nsfasyn;
format nsfasyn $newn.;
tables nsfasyn*quintile*gradind/ plots=freqplot (twoway=cluster scale=percent) out=graphs5;
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;From this code I got the following graphs:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nikster101_0-1633337051745.png" style="width: 300px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64334i1D578EE3687DD7D9/image-dimensions/300x225?v=v2" width="300" height="225" role="button" title="Nikster101_0-1633337051745.png" alt="Nikster101_0-1633337051745.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nikster101_1-1633337078718.png" style="width: 300px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64335iF2F1B4BD00370B1B/image-dimensions/300x225?v=v2" width="300" height="225" role="button" title="Nikster101_1-1633337078718.png" alt="Nikster101_1-1633337078718.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How do I combine these graphs into one bar graph? I was thinking of using proc sgplot but nothing has work so far as it only allows for 2 variables.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 08:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/771870#M245007</guid>
      <dc:creator>Nikster101</dc:creator>
      <dc:date>2021-10-04T08:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Bar graphs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/771945#M245038</link>
      <description>&lt;P&gt;Please describe HOW want this combined into one graph. Do you want 4 groups of 3 bars side by side in one panel?&lt;/P&gt;
&lt;P&gt;Stacked on top of each other? One set of values "behind" the other?&lt;/P&gt;
&lt;P&gt;If you have an image of what you want that gives us a chance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will almost certainly have to use something other than Proc FREQ as that procedure has very few graphing control options and is more intended for data exploration than "camera ready" for report purposes.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 15:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/771945#M245038</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-04T15:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Bar graphs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/771952#M245043</link>
      <description>You may need to create a new variable that has the two levels, NSFASYN and GRADINC into one and then use either PROC FREQ or SGPLOT. &lt;BR /&gt;&lt;BR /&gt;I don't know if there's a way to specify two grouping variables in a single plot in that fashion easily. I think you can if you want to get into proc template or some of the more complex graphing options. I would definitely try the first option. But that also assumes I'm interpreting how you want them graphed correctly. Depending on exactly what you want, SGPANEL with PANELBY NSFASYN may be correct as well.</description>
      <pubDate>Mon, 04 Oct 2021 16:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/771952#M245043</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-04T16:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Bar graphs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/772029#M245079</link>
      <description>Yes, it would be 4 groups(2 x dropout, 2 x graduates) with 3 bars (quintiles) for each of the groups. So it be be one whole graph with (1 x dropout, 1 x graduate and 3 bars for each) for nsfasyn=y and then (1 x dropout, 1 x graduate and 3 bars for each) for nsfasyn=n. So it basically combine the 2 graphs I posted all in one</description>
      <pubDate>Mon, 04 Oct 2021 21:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/772029#M245079</guid>
      <dc:creator>Nikster101</dc:creator>
      <dc:date>2021-10-04T21:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Bar graphs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/772030#M245080</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It would be 4 groups(2 x dropout, 2 x graduates) with 3 bars (quintiles) for each of the groups. So it be be one whole graph with (1 x dropout, 1 x graduate and 3 bars for each) for nsfasyn=y and then (1 x dropout, 1 x graduate and 3 bars for each) for nsfasyn=n. So it basically combine the 2 graphs I posted all in one. I am stuck here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 21:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/772030#M245080</guid>
      <dc:creator>Nikster101</dc:creator>
      <dc:date>2021-10-04T21:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Bar graphs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/772033#M245082</link>
      <description>Then I suggest creating a new variable that combines the two as I indicated earlier.</description>
      <pubDate>Mon, 04 Oct 2021 22:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Bar-graphs/m-p/772033#M245082</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-04T22:09:28Z</dc:date>
    </item>
  </channel>
</rss>

