<?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 SGPLOT series interval in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483909#M31379</link>
    <description>&lt;P&gt;Let's say I have this code:&lt;/P&gt;&lt;PRE&gt;proc sgplot data=have;
series x=var y=var2;
series x=var y=var3;
series x=var y=var4;
xaxis grid values = (0 to 23 by 1);
run;&lt;/PRE&gt;&lt;P&gt;is there a way I can display each series in different intervals like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;series 1: from 0-10 only&lt;/P&gt;&lt;P&gt;series 2: 0-12 and 18-23 BREAK;&lt;/P&gt;&lt;P&gt;series 3: 12-19&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to change the axis size&lt;/P&gt;</description>
    <pubDate>Fri, 03 Aug 2018 19:58:30 GMT</pubDate>
    <dc:creator>matt23</dc:creator>
    <dc:date>2018-08-03T19:58:30Z</dc:date>
    <item>
      <title>SGPLOT series interval</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483909#M31379</link>
      <description>&lt;P&gt;Let's say I have this code:&lt;/P&gt;&lt;PRE&gt;proc sgplot data=have;
series x=var y=var2;
series x=var y=var3;
series x=var y=var4;
xaxis grid values = (0 to 23 by 1);
run;&lt;/PRE&gt;&lt;P&gt;is there a way I can display each series in different intervals like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;series 1: from 0-10 only&lt;/P&gt;&lt;P&gt;series 2: 0-12 and 18-23 BREAK;&lt;/P&gt;&lt;P&gt;series 3: 12-19&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to change the axis size&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 19:58:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483909#M31379</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-08-03T19:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT series interval</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483916#M31380</link>
      <description>&lt;P&gt;the main piece would be to have y variable values as missing for the X values you don't want the series ploted. Then use the option BREAK on the plot statements. Any x value with a missing y would the "break" the series connection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the DATA has to support this, not just the plot statements.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 20:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483916#M31380</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-03T20:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT series interval</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483918#M31381</link>
      <description>So there's no way to do this without playing with the data?</description>
      <pubDate>Fri, 03 Aug 2018 20:26:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483918#M31381</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-08-03T20:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT series interval</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483923#M31382</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216327"&gt;@matt23&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;So there's no way to do this without playing with the data?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not very difficult:&lt;/P&gt;
&lt;PRE&gt;data plot;
   set have;
   where 0 le x le 23;
   if not (0 le x le 10) then var2=.;
   if 12 lt x lt 18 then var3=.
   if not (12 le x le 19) var4=.;
run;

proc sgplot data=plot;
series x=var y=var2 / break;
series x=var y=var3 / break;
series x=var y=var4 / break;
xaxis grid values = (0 to 23 by 1);
run;&lt;/PRE&gt;
&lt;P&gt;should do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try it in Excel. See how much manipulation you do.&lt;/P&gt;
&lt;P&gt;Some other approaches might involve adding group variables and assigning attributes to make certain groups "invisible" but that's more work I think.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 20:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SGPLOT-series-interval/m-p/483923#M31382</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-03T20:39:10Z</dc:date>
    </item>
  </channel>
</rss>

