<?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: vbar display both % and count in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511206#M17384</link>
    <description>In my code it repeats the x axis label, rather than counts as in your example.</description>
    <pubDate>Wed, 07 Nov 2018 21:41:07 GMT</pubDate>
    <dc:creator>capam</dc:creator>
    <dc:date>2018-11-07T21:41:07Z</dc:date>
    <item>
      <title>vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511151#M17373</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to display on a single plot using vbar or similar labeling with both percentage and frequency count displayed. I use sas 9.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code I have is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=have noborder;&lt;BR /&gt;yaxis label= "Counts";&lt;BR /&gt;vbar var/GROUPORDER=ascending stat=percent datalabel;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I modify it to add counts?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 19:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511151#M17373</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-11-07T19:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511178#M17375</link>
      <description>&lt;P&gt;&lt;SPAN&gt;See if this will work for you:&lt;/SPAN&gt;&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 noborder;
yaxis label= "Counts";
vbar age/GROUPORDER=ascending stat=percent datalabel;
xaxistable age / location=inside stat=freq;
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>Wed, 07 Nov 2018 20:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511178#M17375</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-11-07T20:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511184#M17377</link>
      <description>Thanks Dan for the quick response.&lt;BR /&gt;I tried it and it duplicated the items on the x-axis and did not add a percentage.&lt;BR /&gt;capam</description>
      <pubDate>Wed, 07 Nov 2018 20:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511184#M17377</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-11-07T20:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511189#M17379</link>
      <description>Sorry, it kept the percentage, but did not add a freq.</description>
      <pubDate>Wed, 07 Nov 2018 20:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511189#M17379</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-11-07T20:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511190#M17380</link>
      <description>&lt;P&gt;I get the percent labels on the bars and the freq values in the axis table. What version of SAS 9.4 do you have? Please run this and let me know what the log says:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;sysvlong;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 20:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511190#M17380</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-11-07T20:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511193#M17381</link>
      <description>version 7.100.3.5419</description>
      <pubDate>Wed, 07 Nov 2018 20:49:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511193#M17381</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-11-07T20:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511196#M17382</link>
      <description>64 %put &amp;amp;sysvlong;&lt;BR /&gt;9.04.01M3P062415</description>
      <pubDate>Wed, 07 Nov 2018 20:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511196#M17382</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-11-07T20:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511200#M17383</link>
      <description>&lt;P&gt;In the example, the freq values are along the bottom of the bars. I get this with 9.4m3 as well: They can be also moved to the top of the graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://drummer.unx.sas.com:44399/results/sastmp/SAS_work2EF800004A49_drummer/SGPlot.png" border="0" alt="The SGPlot Procedure" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 21:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511200#M17383</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-11-07T21:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511206#M17384</link>
      <description>In my code it repeats the x axis label, rather than counts as in your example.</description>
      <pubDate>Wed, 07 Nov 2018 21:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511206#M17384</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-11-07T21:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511213#M17385</link>
      <description>&lt;P&gt;In that case, just add LABEL="Frequency" to the XAXISTABLE statement (after the "/").&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 22:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511213#M17385</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-11-07T22:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511215#M17386</link>
      <description>&lt;P&gt;Or, are you saying that it just repeats 11, 12 13, 14, 15, and 16?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 22:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511215#M17386</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-11-07T22:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511352#M17393</link>
      <description>Yes. Thanks for the post on labeling, but that's not my main concern. For some reason it is not displaying the count values only the labels as you stated above.</description>
      <pubDate>Thu, 08 Nov 2018 12:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/511352#M17393</guid>
      <dc:creator>capam</dc:creator>
      <dc:date>2018-11-08T12:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: vbar display both % and count</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/512227#M17413</link>
      <description>&lt;P&gt;Try this and see if it works for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a small datastep, copy your category column to another column (such as age2, in this example.) Use age2 in the XAXISTABLE instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
set sashelp.class;
age2=age;
run;

proc sgplot data=sashelp.class noborder;
yaxis label= "Counts";
vbar age/GROUPORDER=ascending stat=percent datalabel;
xaxistable age2 / location=inside stat=freq label="Frequency";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Nov 2018 15:36:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-display-both-and-count/m-p/512227#M17413</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-11-12T15:36:16Z</dc:date>
    </item>
  </channel>
</rss>

