<?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: proc sgplot to draw bar plots, with user defined order of categories? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266501#M9554</link>
    <description>So great!!! Thank you!</description>
    <pubDate>Tue, 26 Apr 2016 19:07:24 GMT</pubDate>
    <dc:creator>fengyuwuzu</dc:creator>
    <dc:date>2016-04-26T19:07:24Z</dc:date>
    <item>
      <title>proc sgplot to draw bar plots, with user defined order of categories?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266470#M9540</link>
      <description>&lt;P&gt;I want to order the bars in the bar chart, based on my own order, not by the default order. Is there a way to do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 17:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266470#M9540</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-04-26T17:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot to draw bar plots, with user defined order of categories?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266495#M9551</link>
      <description>&lt;P&gt;Yes. Sort the data set so that the categories appear i nthe order you want. Then use the XAXIS DISCRETEORDER=DATA option to tell the plot to use the order of the categories as they appear in the data set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New"&gt;sgplot&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;=sashelp.cars;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;vbar&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; Type;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;xaxis&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;discreteorder&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;=data;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more elaborate examples, see the article &lt;A href="http://blogs.sas.com/content/iml/2014/09/08/order-variables-by-statistic.html" target="_self"&gt;"Order variables by values of a statistic"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 18:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266495#M9551</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-04-26T18:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot to draw bar plots, with user defined order of categories?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266498#M9553</link>
      <description>&lt;P&gt;Hi have a look at the VALUES= option of the XAXIS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Find below a code sample:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars tmplout="c:/temp/sgplot.sas";
  vbar type / response=Horsepower stat=mean;
  xaxis values=("SUV" "Hybrid" "Wagon" "Truck");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 18:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266498#M9553</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-04-26T18:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot to draw bar plots, with user defined order of categories?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266501#M9554</link>
      <description>So great!!! Thank you!</description>
      <pubDate>Tue, 26 Apr 2016 19:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-to-draw-bar-plots-with-user-defined-order-of/m-p/266501#M9554</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-04-26T19:07:24Z</dc:date>
    </item>
  </channel>
</rss>

