<?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 Ascending option in proc sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116009#M4378</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to show my data (percentages of building performance 0-100%) in a vertical bar chart. The x-axis is the building ID number and so proc sgplot is ordering the x-axis by the ID number, but I'd like to order the bars in ascending order. Is there an ascending option in proc sgplot?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I have a large chart and I'd like to split into two charts. Is there a way to do this so that exactly half of the data fits onto one chart and the other half onto another chart? Or will I need to tell SAS the Building ID numbers I want on chart 1 and those I want on chart 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Apr 2013 19:31:01 GMT</pubDate>
    <dc:creator>sarahsasuser</dc:creator>
    <dc:date>2013-04-22T19:31:01Z</dc:date>
    <item>
      <title>Ascending option in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116009#M4378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to show my data (percentages of building performance 0-100%) in a vertical bar chart. The x-axis is the building ID number and so proc sgplot is ordering the x-axis by the ID number, but I'd like to order the bars in ascending order. Is there an ascending option in proc sgplot?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I have a large chart and I'd like to split into two charts. Is there a way to do this so that exactly half of the data fits onto one chart and the other half onto another chart? Or will I need to tell SAS the Building ID numbers I want on chart 1 and those I want on chart 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 19:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116009#M4378</guid>
      <dc:creator>sarahsasuser</dc:creator>
      <dc:date>2013-04-22T19:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Ascending option in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116010#M4379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With SAS 9.3, you can use the option CATEGORYORDER=RESPDESC on the VBAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, you can sort the data in the order you need, and then use XAXIS DISCRETEORDER=DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For splitting your graph, one idea is to add another column, say GROUP with two values, say 1 &amp;amp; 2.&amp;nbsp; Then use a BY option on the SGPLOT with this variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, use SGPANEL and use GROUP as the class variable on the PANELBY statement, and set COLUMNS and ROWS to 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 19:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116010#M4379</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-04-22T19:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ascending option in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116011#M4380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sanjay. This worked: &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;XAXIS DISCRETEORDER=DATA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For splitting the graph, I used your suggestion of using a by statement. Proc sgplot split the chart as desired, but included the building ids with missing data depending on the group. So the second half of the first chart is a list of the group 2 buildings with no data. Also, I would want to suppress the group=1 notation in the title as this has no meaning to user. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 19:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116011#M4380</guid>
      <dc:creator>sarahsasuser</dc:creator>
      <dc:date>2013-04-22T19:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ascending option in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116012#M4381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See example below.&amp;nbsp; Assuming you create a variable equivalent to the "Sex" variable, the code below will create two output graphs.&amp;nbsp; Use OPTIONS NOBYLINE to suppress the by line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=sashelp.class out=class;&lt;BR /&gt;&amp;nbsp; by sex descending height;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options nobyline;&lt;/P&gt;&lt;P&gt;proc sgplot data=class;&lt;BR /&gt;&amp;nbsp; by sex;&lt;BR /&gt;&amp;nbsp; vbar name / response=height;&lt;BR /&gt;&amp;nbsp; xaxis discreteorder=data;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 20:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116012#M4381</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-04-22T20:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ascending option in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116013#M4382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 21:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ascending-option-in-proc-sgplot/m-p/116013#M4382</guid>
      <dc:creator>sarahsasuser</dc:creator>
      <dc:date>2013-04-22T21:09:09Z</dc:date>
    </item>
  </channel>
</rss>

