<?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: Gplot : Date on X-axis not showing correctly in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243804#M55981</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data = test;
scatter y= value x= month ;
        format month date9. ; 
xaxis values=("31oct2014"d "30nov2014"d "01Jan2015"d "28FEB2015"d "31MAR2015"d "30APR2015"d "31MAY2015"d );
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's an example, it's close but not exact, but you can play around with the axis statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jan 2016 15:49:14 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-01-15T15:49:14Z</dc:date>
    <item>
      <title>Gplot : Date on X-axis not showing correctly</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243781#M55976</link>
      <description>&lt;P&gt;I'm having some troubles with the x-axis when using&amp;nbsp;&lt;STRONG&gt;proc gplot&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The X-axis &lt;EM&gt;should&lt;/EM&gt; display the values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;31OCT2014 &amp;nbsp; 30NOV2014 &amp;nbsp; 31DEC2014 ...&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but this is not the case. Instead the values are shifted one single day, which means&lt;/P&gt;
&lt;P&gt;that the values shown on the x-axis in the plot are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;01NOV2014 &amp;nbsp; 01DEC2014 &amp;nbsp; 01JAN2015&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know why this happens? Here's and example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;input month value;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;datalines;&lt;BR /&gt;20027 89&lt;BR /&gt;20057 139&lt;BR /&gt;20088 213&lt;BR /&gt;20119 131&lt;BR /&gt;20147 371&lt;BR /&gt;20178 418&lt;BR /&gt;20208 790&lt;BR /&gt;20239 532&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc gplot data = test;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plot value * month ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; format month date9. ; &lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An additional annoying this is that not only has the x-values shifted one single day, an additional tick mark (&lt;STRONG&gt;01OCT2014&lt;/STRONG&gt;) appears in which no corresponding y-value exists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 14:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243781#M55976</guid>
      <dc:creator>haw</dc:creator>
      <dc:date>2016-01-15T14:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Gplot : Date on X-axis not showing correctly</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243793#M55979</link>
      <description>&lt;P&gt;It hasn't moved your data. &amp;nbsp;It is setting the tick values up in what it can logically assign as a logical order. &amp;nbsp;So your first data item, 31oct, is between 01oct and 01nov. &amp;nbsp;As the logical sequence chosen is 01 of each month, it need to include both of those to be able to plot 32oct which is just off to the left of 01nov. &amp;nbsp;To get round this you need to tell the system what your axis ticks should be, don't let the system guess for you. &amp;nbsp;I don't use the old gplot software, so can't remember the syntax, but if you move to sgplot or graph template it is along the lines of:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;xaxis / values=("31oct2014"d "30nov2014"d etc.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 14:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243793#M55979</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-15T14:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Gplot : Date on X-axis not showing correctly</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243804#M55981</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data = test;
scatter y= value x= month ;
        format month date9. ; 
xaxis values=("31oct2014"d "30nov2014"d "01Jan2015"d "28FEB2015"d "31MAR2015"d "30APR2015"d "31MAY2015"d );
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's an example, it's close but not exact, but you can play around with the axis statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 15:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243804#M55981</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-15T15:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Gplot : Date on X-axis not showing correctly</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243808#M55982</link>
      <description>&lt;P&gt;GPLOT, unless told otherwise with an AXIS statement, will default to guessing the "best" display for values. If the variable has a DATE related format then it will make guesses based on dates. If your data had spanned enough years you might only see ticks for January or January and July.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way would be to try using a different format such as MONYY7. The ticks will still actually appear on the graph at the first of the month the the "annoying" day of month won't display.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 15:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/243808#M55982</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-15T15:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Gplot : Date on X-axis not showing correctly</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/244179#M56021</link>
      <description>&lt;P&gt;Thank you - all of you for a great and quick response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your help was strongly appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 09:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Gplot-Date-on-X-axis-not-showing-correctly/m-p/244179#M56021</guid>
      <dc:creator>haw</dc:creator>
      <dc:date>2016-01-18T09:17:53Z</dc:date>
    </item>
  </channel>
</rss>

