<?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: Is there a way to convert freq sgplot to % while keeping freq labels? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623444#M19430</link>
    <description>&lt;P&gt;crude example, shouldn't have used heights... just used it as the visualization. pretend it is count data. Want % each bar contributes to the total count (if the heights were counts)&lt;/P&gt;</description>
    <pubDate>Sun, 09 Feb 2020 20:54:29 GMT</pubDate>
    <dc:creator>richart</dc:creator>
    <dc:date>2020-02-09T20:54:29Z</dc:date>
    <item>
      <title>Is there a way to convert freq sgplot to % while keeping freq labels?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623442#M19428</link>
      <description>&lt;P&gt;I have something like attached. Is there a way to change the y axis to % while keeping the annotated actual count above the bars? (i.e. change response to pct but the 56.5, 62.8 etc above the bars?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://support.sas.com/kb/50/addl/fusion_50541_1_g50541.png" border="0" alt="Image result for bar graph sas with annotation above bar" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 20:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623442#M19428</guid>
      <dc:creator>richart</dc:creator>
      <dc:date>2020-02-09T20:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to convert freq sgplot to % while keeping freq labels?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623443#M19429</link>
      <description>&lt;P&gt;Percent of what? I don't understand how this applies to heights.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 20:46:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623443#M19429</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-09T20:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to convert freq sgplot to % while keeping freq labels?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623444#M19430</link>
      <description>&lt;P&gt;crude example, shouldn't have used heights... just used it as the visualization. pretend it is count data. Want % each bar contributes to the total count (if the heights were counts)&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 20:54:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623444#M19430</guid>
      <dc:creator>richart</dc:creator>
      <dc:date>2020-02-09T20:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to convert freq sgplot to % while keeping freq labels?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623446#M19431</link>
      <description>&lt;P&gt;Okay, if I am understanding the question properly (and I may not be), you can use the &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n0p7vdd69sgf3wn1479qxqxuryrt.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;VBAR&lt;/A&gt; statement in PROC SGPLOT, with the DATALABEL= option and probably other options to achieve this. The formatting of the y-axis can be achieved by the &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n0n6uml63c6h8dn16phbd1arm9g9.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;YAXIS&lt;/A&gt; command with the VALUESFORMAT= option.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2020 21:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623446#M19431</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-09T21:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to convert freq sgplot to % while keeping freq labels?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623566#M19434</link>
      <description>&lt;P&gt;I think you need to pre-summarize the data so that the input data contains a Count for each category. Then you can use STAT=PCT to set the Y axis and use DATALABEL=Count to specify the bar labels:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* create bar chart of counts by age */
proc means data=sashelp.class;
class age;
var height;
output out=ClassSummary N=Count;
run;

proc sgplot data=ClassSummary;
vbar age / freq=Count stat=pct datalabel=Count;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 14:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-convert-freq-sgplot-to-while-keeping-freq/m-p/623566#M19434</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-02-10T14:36:28Z</dc:date>
    </item>
  </channel>
</rss>

