<?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: trendline, Average Line or target line in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/trendline-Average-Line-or-target-line/m-p/467904#M119472</link>
    <description>&lt;P&gt;You can define the start and end values for axis in XAXIS, YAXIS values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;something like: YAXIS values=(&amp;amp;min to &amp;amp;max by 0.1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get the max and min values from the dataset using proc sql INTO;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select max(var1),Min(var2) into: max,:min&lt;/P&gt;
&lt;P&gt;from have;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the yaxis to extend then add values to max like:&amp;nbsp;&lt;SPAN&gt;YAXIS values=(&amp;amp;min to &amp;amp;max+2 by 0.1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check this example how to increase the yaxis lines:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select max(weight)+50,min(weight) into: max,:min
from sashelp.class;
quit;
options symbolgen;
proc sgplot data=sashelp.class;
  scatter x=height y=weight / group=sex;
  yaxis values=(&amp;amp;min to &amp;amp;max by 20);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you still don't get then please provide your sample data in the form of data step. Someone can sure help you if you clearly provide your requirement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jun 2018 00:13:38 GMT</pubDate>
    <dc:creator>SuryaKiran</dc:creator>
    <dc:date>2018-06-06T00:13:38Z</dc:date>
    <item>
      <title>trendline, Average Line or target line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/trendline-Average-Line-or-target-line/m-p/467901#M119471</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having problems with the SGPLOT refline option&amp;nbsp; I have provided an example .&amp;nbsp; Please see attached&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 23:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/trendline-Average-Line-or-target-line/m-p/467901#M119471</guid>
      <dc:creator>JBrew</dc:creator>
      <dc:date>2018-06-05T23:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: trendline, Average Line or target line</title>
      <link>https://communities.sas.com/t5/SAS-Programming/trendline-Average-Line-or-target-line/m-p/467904#M119472</link>
      <description>&lt;P&gt;You can define the start and end values for axis in XAXIS, YAXIS values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;something like: YAXIS values=(&amp;amp;min to &amp;amp;max by 0.1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get the max and min values from the dataset using proc sql INTO;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select max(var1),Min(var2) into: max,:min&lt;/P&gt;
&lt;P&gt;from have;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the yaxis to extend then add values to max like:&amp;nbsp;&lt;SPAN&gt;YAXIS values=(&amp;amp;min to &amp;amp;max+2 by 0.1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check this example how to increase the yaxis lines:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select max(weight)+50,min(weight) into: max,:min
from sashelp.class;
quit;
options symbolgen;
proc sgplot data=sashelp.class;
  scatter x=height y=weight / group=sex;
  yaxis values=(&amp;amp;min to &amp;amp;max by 20);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you still don't get then please provide your sample data in the form of data step. Someone can sure help you if you clearly provide your requirement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 00:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/trendline-Average-Line-or-target-line/m-p/467904#M119472</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-06T00:13:38Z</dc:date>
    </item>
  </channel>
</rss>

