<?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 why is my x axis going out of order even though i have it sorted with numeric variable ? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985768#M25868</link>
    <description>&lt;P&gt;my code is below: I have x axis values like in months such as&amp;nbsp; D1 D28 2 3 4 6 12 18 24 36 but for one subject it is plotting month 18 after month 48 even though data is sorted properly by numeric variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title 'Percent Predicted FEV1 for Individual Subjects in Four 4D-710 Dose Cohorts';&lt;BR /&gt;proc sgplot data= combo;&lt;BR /&gt;xaxis grid type= discrete discreteorder= data;&lt;BR /&gt;series x = month y= RESTRESN/ group=subjid;&lt;BR /&gt;scatter x=month y= RESTRESN/ group= subjid ;&lt;BR /&gt;xaxis label= 'Month';&lt;BR /&gt;yaxis label= 'ppFEV1 (%)';&lt;BR /&gt;by cohort;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Apr 2026 14:55:44 GMT</pubDate>
    <dc:creator>dsam</dc:creator>
    <dc:date>2026-04-01T14:55:44Z</dc:date>
    <item>
      <title>why is my x axis going out of order even though i have it sorted with numeric variable ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985768#M25868</link>
      <description>&lt;P&gt;my code is below: I have x axis values like in months such as&amp;nbsp; D1 D28 2 3 4 6 12 18 24 36 but for one subject it is plotting month 18 after month 48 even though data is sorted properly by numeric variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title 'Percent Predicted FEV1 for Individual Subjects in Four 4D-710 Dose Cohorts';&lt;BR /&gt;proc sgplot data= combo;&lt;BR /&gt;xaxis grid type= discrete discreteorder= data;&lt;BR /&gt;series x = month y= RESTRESN/ group=subjid;&lt;BR /&gt;scatter x=month y= RESTRESN/ group= subjid ;&lt;BR /&gt;xaxis label= 'Month';&lt;BR /&gt;yaxis label= 'ppFEV1 (%)';&lt;BR /&gt;by cohort;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 14:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985768#M25868</guid>
      <dc:creator>dsam</dc:creator>
      <dc:date>2026-04-01T14:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: why is my x axis going out of order even though i have it sorted with numeric variable ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985769#M25869</link>
      <description>&lt;P&gt;Most likely because the value of 18 did not appear in the first BY group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding observations for every possible MONTH value that have a new COHORT value that will sort before the others.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 15:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985769#M25869</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-04-01T15:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: why is my x axis going out of order even though i have it sorted with numeric variable ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985772#M25870</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/448003"&gt;@dsam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;my code is below: I have x axis values like in months such as&amp;nbsp; D1 D28 2 3 4 6 12 18 24 36 but for one subject it is plotting month 18 after month 48 even though data is sorted properly by numeric variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title 'Percent Predicted FEV1 for Individual Subjects in Four 4D-710 Dose Cohorts';&lt;BR /&gt;proc sgplot data= combo;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;xaxis grid type= discrete discreteorder= data;&lt;/FONT&gt;&lt;BR /&gt;series x = month y= RESTRESN/ group=subjid;&lt;BR /&gt;scatter x=month y= RESTRESN/ group= subjid ;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;xaxis label= 'Month';&lt;/FONT&gt;&lt;BR /&gt;yaxis label= 'ppFEV1 (%)';&lt;BR /&gt;by cohort;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When you have multiple XAXIS statements, the second one replaces whatever is specified in the first.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 15:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985772#M25870</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2026-04-01T15:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: why is my x axis going out of order even though i have it sorted with numeric variable ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985773#M25871</link>
      <description>&lt;P&gt;Combine your two XAXIS statements into one statement since it appears the DISCRETEORDER= option is not being maintained.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Percent Predicted FEV1 for Individual Subjects in Four 4D-710 Dose Cohorts';
proc sgplot data= combo;
xaxis grid type= discrete discreteorder= data label= 'Month';
series x = month y= RESTRESN/ group=subjid;
scatter x=month y= RESTRESN/ group= subjid ;
yaxis label= 'ppFEV1 (%)';
by cohort;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope that helps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Marcia&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 15:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/why-is-my-x-axis-going-out-of-order-even-though-i-have-it-sorted/m-p/985773#M25871</guid>
      <dc:creator>MarciaS</dc:creator>
      <dc:date>2026-04-01T15:19:04Z</dc:date>
    </item>
  </channel>
</rss>

