<?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: SGPLOT Refline in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331578#M11554</link>
    <description>&lt;P&gt;Is your input data in your X axis column in DATE or DATETIME format (not the column format, but the actual values)?&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2017 16:12:35 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2017-02-10T16:12:35Z</dc:date>
    <item>
      <title>SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331527#M11548</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having a problem creating 2 reference lines.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The input for my X Axis&amp;nbsp;looks like Datetime7:&amp;nbsp;&amp;nbsp; 01JUL15&amp;nbsp; through &amp;nbsp;30DEC16.&lt;/P&gt;&lt;P&gt;SGPLOT replaces Datetime7 with an auto-generated format.&amp;nbsp;&amp;nbsp; It looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jul&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Sep&amp;nbsp;&amp;nbsp;&amp;nbsp; Nov&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Mar&amp;nbsp; May Jul &amp;nbsp;........................ Jan&lt;/P&gt;&lt;P&gt;2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I create reference lines at 08FEB16 and 17MAR16?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get&amp;nbsp;errors when I use the numerics for those dates, use the actual Datetime7 dates,&amp;nbsp;and when I just ask for FEB or MAR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help you can give.&lt;/P&gt;&lt;P&gt;CEG&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 14:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331527#M11548</guid>
      <dc:creator>CEG</dc:creator>
      <dc:date>2017-02-10T14:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331543#M11549</link>
      <description>&lt;P&gt;Use the date literals:&lt;/P&gt;
&lt;P&gt;'08FEB2016'D &amp;nbsp;and&amp;nbsp; '17MAR2016'D&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.stocks;
series x=date y=close / group=stock;
refline '08FEB1993'D '17MAR2000'D / axis=X;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2017 15:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331543#M11549</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-02-10T15:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331547#M11550</link>
      <description>&lt;P&gt;Or for datetime values something like:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;'10NOV05:00:00:00'dt&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 15:18:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331547#M11550</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-10T15:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331560#M11551</link>
      <description>By adding the 00:00:00, it gave me the 17MAR16 line; but it didn't create the 08FEB16 line.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The auto-generation gives me every other month which excludes FEB. Is there a way to override that?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Feb 2017 15:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331560#M11551</guid>
      <dc:creator>CEG</dc:creator>
      <dc:date>2017-02-10T15:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331571#M11552</link>
      <description>&lt;P&gt;You can use the INTERVAL option on the XAXIS statement to override the internally-determined time interval; however, since the time axis is continuous, the presence or absense of the FEB tick value should not affect the placement of the REFLINE.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:02:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331571#M11552</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-02-10T16:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331574#M11553</link>
      <description>Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you think of anything else that could cause the FEB line to be ignored?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331574#M11553</guid>
      <dc:creator>CEG</dc:creator>
      <dc:date>2017-02-10T16:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331578#M11554</link>
      <description>&lt;P&gt;Is your input data in your X axis column in DATE or DATETIME format (not the column format, but the actual values)?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331578#M11554</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-02-10T16:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331580#M11555</link>
      <description>I format the numeric values into Datetime7.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331580#M11555</guid>
      <dc:creator>CEG</dc:creator>
      <dc:date>2017-02-10T16:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331584#M11556</link>
      <description>&lt;P&gt;I needed to know the RAW format of the input date, not the final formatted value. The reason I ask is that it might make a difference on whether you should specify the refline value as '01jan2016'd (Rick) or&amp;nbsp;&lt;SPAN&gt;'01jan2016:00:00:00'dt (ballardw). You want the refline value to match the other raw values used on the axis.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331584#M11556</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-02-10T16:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331591#M11557</link>
      <description>&lt;P&gt;To do what Dan asks, &amp;nbsp;remove the format and use PROC PRINT to see the raw values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* replace the name of the dat set with YOUR name */
proc print data=sashelp.timedata(OBS=3);
format datetime;   /* &amp;lt;== put the name of YOUR variable here */
var datetime;        /* &amp;lt;== and here */
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331591#M11557</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-02-10T16:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331637#M11558</link>
      <description>I'm sorry. Thanks for everyone's help.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The "numerics" I was talking about are 10 digits. That's why adding the 00:00:00 worked for at least the March date. The format was 7.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here they are: 1751377219 1751420561 1751432207&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Feb 2017 19:19:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331637#M11558</guid>
      <dc:creator>CEG</dc:creator>
      <dc:date>2017-02-10T19:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331644#M11560</link>
      <description>&lt;P&gt;As we said earlier, use the literal datetime&amp;nbsp;constants. See if this helps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
format x datetime20.;
do x = '01JUL2015:00:00:00'DT to '3DEC2016:00:00:00'DT by 1e6;
   y = 3 + sin(x/2e7);
   output;
end;

proc sgplot data=A;
series x=x y=y;
refline '08FEB2016:00:00:00'DT  '17MAR2016:00:00:00'DT / axis=x;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2017 19:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331644#M11560</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-02-10T19:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Refline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331748#M11569</link>
      <description>Thanks! I almost got it. This helped. Have to make a few adjustments.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Feb 2017 23:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Refline/m-p/331748#M11569</guid>
      <dc:creator>CEG</dc:creator>
      <dc:date>2017-02-10T23:42:37Z</dc:date>
    </item>
  </channel>
</rss>

