<?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 SAS - stacked bar graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-stacked-bar-graph/m-p/400401#M13669</link>
    <description>&lt;P&gt;Hi community members,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to make a stacked bar graph but I am not sure why one of the categories for two variables reveresed their place. Please see the picture attached herewith. my code to produce the chart is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;BR /&gt;PROC SGPLOT DATA = stress;&lt;BR /&gt;VBAR variable / RESPONSE = percent GROUP = endorsed STAT = SUM SEGLABEL CATEGORYORDER = RESPDESC;&lt;BR /&gt;YAXIS GRID LABEL = "Percentage";&lt;BR /&gt;RUN;&lt;BR /&gt;ods graphics off;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2017 19:20:33 GMT</pubDate>
    <dc:creator>Pooja2</dc:creator>
    <dc:date>2017-10-02T19:20:33Z</dc:date>
    <item>
      <title>SAS - stacked bar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-stacked-bar-graph/m-p/400401#M13669</link>
      <description>&lt;P&gt;Hi community members,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to make a stacked bar graph but I am not sure why one of the categories for two variables reveresed their place. Please see the picture attached herewith. my code to produce the chart is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;BR /&gt;PROC SGPLOT DATA = stress;&lt;BR /&gt;VBAR variable / RESPONSE = percent GROUP = endorsed STAT = SUM SEGLABEL CATEGORYORDER = RESPDESC;&lt;BR /&gt;YAXIS GRID LABEL = "Percentage";&lt;BR /&gt;RUN;&lt;BR /&gt;ods graphics off;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 19:20:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-stacked-bar-graph/m-p/400401#M13669</guid>
      <dc:creator>Pooja2</dc:creator>
      <dc:date>2017-10-02T19:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS - stacked bar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-stacked-bar-graph/m-p/400414#M13670</link>
      <description>&lt;P&gt;I have a hunch about why this happened, but I cannot verify that without your data. However, I think I have determined that your data is pre-summarized, based on the graph and the options you used. Therefore, try this as a workaround:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=stress out=stress2; by descending group descending percent; run;

ods graphics on;
PROC SGPLOT DATA = stress2;
VBARPARM category=variable RESPONSE = percent / GROUP = endorsed SEGLABEL groupdisplay=stack;
YAXIS GRID LABEL = "Percentage";
RUN;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 19:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-stacked-bar-graph/m-p/400414#M13670</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-10-02T19:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS - stacked bar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-stacked-bar-graph/m-p/400448#M13674</link>
      <description>&lt;P&gt;Thanks Dan. That was awesome and easy fix. I had done freq analysis for each variable and then summarized them in a table to produce stacked bar graph. I am not sure how to do it otherwise. I am still learning SAS and loving it for analysis at work at school both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 20:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-stacked-bar-graph/m-p/400448#M13674</guid>
      <dc:creator>Pooja2</dc:creator>
      <dc:date>2017-10-02T20:28:43Z</dc:date>
    </item>
  </channel>
</rss>

