<?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: Can I add % in proc sgplot hbar? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/590081#M18893</link>
    <description>&lt;P&gt;If you want to show just percentage in the graph, you can do what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;said (with one additional option for right positioning):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot  data=sashelp.class;
hbar sex / datalabel stat=percent datalabelpos=right;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want the bar chart to still show frequency, but also show percentages, do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot  data=sashelp.class;
hbar sex;
yaxistable sex / stat=percent;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2019 15:41:53 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2019-09-19T15:41:53Z</dc:date>
    <item>
      <title>Can I add % in proc sgplot hbar?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589952#M18886</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to add % in my proc sgplot hbar. I managed to display the actual frequency by datalabel option, but don't know how to show its percentage. Any good idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any procedures to display a looking-good graph with % would be good for me as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data= tcult.set4; hbar group /datalabel; run;&lt;/PRE&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 08:18:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589952#M18886</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-09-19T08:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add % in proc sgplot hbar?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589957#M18887</link>
      <description>Does this blog help: &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2018/02/25/hbar-data-labels/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2018/02/25/hbar-data-labels/&lt;/A&gt;</description>
      <pubDate>Thu, 19 Sep 2019 08:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589957#M18887</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-09-19T08:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add % in proc sgplot hbar?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589958#M18888</link>
      <description>&lt;P&gt;Thanks. My graph looks like the last one in the blog you mentioned. But I would like to add % at the right of the graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 08:44:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589958#M18888</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-09-19T08:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add % in proc sgplot hbar?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589990#M18889</link>
      <description>&lt;P&gt;You mean this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot  data=sashelp.class;
hbar sex/datalabel stat=percent;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Sep 2019 11:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/589990#M18889</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-09-19T11:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add % in proc sgplot hbar?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/590081#M18893</link>
      <description>&lt;P&gt;If you want to show just percentage in the graph, you can do what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;said (with one additional option for right positioning):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot  data=sashelp.class;
hbar sex / datalabel stat=percent datalabelpos=right;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want the bar chart to still show frequency, but also show percentages, do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot  data=sashelp.class;
hbar sex;
yaxistable sex / stat=percent;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 15:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-I-add-in-proc-sgplot-hbar/m-p/590081#M18893</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-09-19T15:41:53Z</dc:date>
    </item>
  </channel>
</rss>

