<?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 Change the x-axis order in SGPLOT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457304#M115933</link>
    <description>&lt;P&gt;i have table as below, How to change the order to display in month order&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input Affected_CI count;&lt;BR /&gt;datalines;&lt;BR /&gt;'54JFY5 Prtfolios ledger -&amp;nbsp; January'&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;BR /&gt;'54JFY5 Prtfolios ledger -&amp;nbsp; February'&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&lt;BR /&gt;'66ABC5 Fund Data Correction -&amp;nbsp; -March'&amp;nbsp;&amp;nbsp;&amp;nbsp; 7;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result as below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="st.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20138i1C8A558990F44606/image-size/large?v=v2&amp;amp;px=999" role="button" title="st.jpg" alt="st.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;expecting in order January,February and march x-as order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Apr 2018 14:20:58 GMT</pubDate>
    <dc:creator>radha009</dc:creator>
    <dc:date>2018-04-25T14:20:58Z</dc:date>
    <item>
      <title>Change the x-axis order in SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457304#M115933</link>
      <description>&lt;P&gt;i have table as below, How to change the order to display in month order&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input Affected_CI count;&lt;BR /&gt;datalines;&lt;BR /&gt;'54JFY5 Prtfolios ledger -&amp;nbsp; January'&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;BR /&gt;'54JFY5 Prtfolios ledger -&amp;nbsp; February'&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&lt;BR /&gt;'66ABC5 Fund Data Correction -&amp;nbsp; -March'&amp;nbsp;&amp;nbsp;&amp;nbsp; 7;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result as below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="st.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20138i1C8A558990F44606/image-size/large?v=v2&amp;amp;px=999" role="button" title="st.jpg" alt="st.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;expecting in order January,February and march x-as order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 14:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457304#M115933</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-04-25T14:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change the x-axis order in SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457309#M115936</link>
      <description>&lt;P&gt;You can use the search bar on the main page to search for topics similar to your question.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/forums/searchpage/tab/message?advanced=false&amp;amp;allow_punctuation=false&amp;amp;q=graph+axis+order" target="_blank"&gt;https://communities.sas.com/t5/forums/searchpage/tab/message?advanced=false&amp;amp;allow_punctuation=false&amp;amp;q=graph+axis+order&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The simplest method is to change the xaxis values to be numbers, and to that field apply a format, so the data sorts per number and displays the formatted version:&lt;/P&gt;
&lt;PRE&gt;proc format;
  value t 
    1='54JFY5 Prtfolios ledger -  January' 
    2='54JFY5 Prtfolios ledger -  February'
    3='66ABC5 Fund Data Correction -  -March';
run;

data inter;
  set have;
  if affected_ci='54JFY5 Prtfolios ledger -  January' then xasxisvar=1;
  if ...;
  format xaxisvar t.;
run;
&lt;/PRE&gt;
&lt;P&gt;Then use xaxisvar on your xaxis.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 14:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457309#M115936</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-25T14:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Change the x-axis order in SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457336#M115939</link>
      <description>&lt;P&gt;The app names are not constant.they are generated on different queries.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 15:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457336#M115939</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-04-25T15:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change the x-axis order in SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457343#M115943</link>
      <description>&lt;P&gt;Then dynamically create the proc format step.&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set your_query_results end=last;
  if _n_=1 then call execute('proc format; value t ');&lt;BR /&gt;  call execute(strip(put(_n_,best.),'=',strip(quote(query_result_text)," ");&lt;BR /&gt;  if last then call execute(';run;');&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;I can only answer what is provided.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 15:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457343#M115943</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-25T15:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Change the x-axis order in SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457355#M115951</link>
      <description>&lt;P&gt;An alternate approach would be have an actual DATE value for the xaxis (fixes the sort issue) using an appropriate format for the display and then have a separate variable, possibly fund,&amp;nbsp;that contains the other text like "54JFY5 Prtfolios ledger" and use that as a group variable and groupdisplay=cluster.&lt;/P&gt;
&lt;P&gt;Yes this would move some of the information from the Axis to a Legend. Depending on the values involved that may be easier to manage long values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to say that having the same color appear for two apparently unrelated data bits&lt;/P&gt;
&lt;P&gt;54JFY5 Prtfolios ledger and 66ABC5 Fund Data Correction&amp;nbsp;is really confusing.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 15:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457355#M115951</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-25T15:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Change the x-axis order in SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457464#M115989</link>
      <description>&lt;P&gt;resolved by adding&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;xaxis display=(nolabel) discreteorder=data;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 19:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-the-x-axis-order-in-SGPLOT/m-p/457464#M115989</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-04-25T19:21:05Z</dc:date>
    </item>
  </channel>
</rss>

