<?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: Gchart showing five most frequent values only in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52666#M1764</link>
    <description>Or, if you have SAS/QC, use &lt;BR /&gt;
&lt;BR /&gt;
proc pareto.&lt;BR /&gt;
hbar variable/maxncat=5;&lt;BR /&gt;
run;</description>
    <pubDate>Tue, 11 Jan 2011 14:53:44 GMT</pubDate>
    <dc:creator>Bill</dc:creator>
    <dc:date>2011-01-11T14:53:44Z</dc:date>
    <item>
      <title>Gchart showing five most frequent values only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52662#M1760</link>
      <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
How can I use proc gchart display the five most frequent values in a data set? From running proc freq, I know that these are the five most frequent values: &lt;BR /&gt;
&lt;BR /&gt;
Value         Count&lt;BR /&gt;
-1000.00     157&lt;BR /&gt;
-2000.00     156&lt;BR /&gt;
-3000.00     155&lt;BR /&gt;
-4000.00     120&lt;BR /&gt;
-10000.00     110&lt;BR /&gt;
&lt;BR /&gt;
I have searched the forums and the web for help but cannot seem to come up with the right combination of search terms to find an answer so I hope that someone in here can help me.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
Helle</description>
      <pubDate>Mon, 20 Dec 2010 11:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52662#M1760</guid>
      <dc:creator>Helle</dc:creator>
      <dc:date>2010-12-20T11:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart showing five most frequent values only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52663#M1761</link>
      <description>Something like this?&lt;BR /&gt;
&lt;BR /&gt;
data foo;&lt;BR /&gt;
input value count;&lt;BR /&gt;
datalines;&lt;BR /&gt;
-1000.00     157&lt;BR /&gt;
-2000.00     156&lt;BR /&gt;
-3000.00     155&lt;BR /&gt;
-4000.00     120&lt;BR /&gt;
-10000.00     110&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc gchart data=foo;&lt;BR /&gt;
vbar value / discrete type=sum sumvar=count;&lt;BR /&gt;
run;</description>
      <pubDate>Mon, 20 Dec 2010 13:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52663#M1761</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-12-20T13:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart showing five most frequent values only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52664#M1762</link>
      <description>Hey,&lt;BR /&gt;
&lt;BR /&gt;
The way I would approach this is to use PROC SUMMARY to summarize the data based on frequency, use PROC SORT to sort the result by descending frequency, and use PROC GCHART to display the first N bars that I want to see (using OBS=). The simple example below charts the 3 most frequent values.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc summary data=sashelp.class nway;&lt;BR /&gt;
class age;&lt;BR /&gt;
output out=agefreq;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=agefreq; by descending _freq_; run;&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=agefreq (obs=3);&lt;BR /&gt;
vbar age / sumvar=_freq_ outside=sum discrete;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps!&lt;BR /&gt;
Dan</description>
      <pubDate>Mon, 20 Dec 2010 19:34:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52664#M1762</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-12-20T19:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart showing five most frequent values only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52665#M1763</link>
      <description>Hi Dan and Robert,&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot for your suggetions - they both do the job &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
&lt;BR /&gt;
Helle</description>
      <pubDate>Tue, 21 Dec 2010 08:17:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52665#M1763</guid>
      <dc:creator>Helle</dc:creator>
      <dc:date>2010-12-21T08:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Gchart showing five most frequent values only</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52666#M1764</link>
      <description>Or, if you have SAS/QC, use &lt;BR /&gt;
&lt;BR /&gt;
proc pareto.&lt;BR /&gt;
hbar variable/maxncat=5;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 11 Jan 2011 14:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Gchart-showing-five-most-frequent-values-only/m-p/52666#M1764</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2011-01-11T14:53:44Z</dc:date>
    </item>
  </channel>
</rss>

