<?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 Syntax to Add a line of Regression to a simple GPLOT Scatter Plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410034#M14035</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to add a regression line to a GPLOT scatter plot, one plot per subject.&amp;nbsp; I have the slope and intercept of the regression line.&amp;nbsp; Is there a simple way to add the line?&amp;nbsp; I was able to get it going with PROC SGPLOT, but the output in the RTF file is much rougher.&amp;nbsp; It would be preferable just to enhance the&amp;nbsp; GPLOT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is my data (for one patient):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;obs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;subjid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;session&amp;nbsp; thresh&amp;nbsp; &amp;nbsp; &amp;nbsp;slope&amp;nbsp; &amp;nbsp; &amp;nbsp; intercpt&lt;BR /&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;35&lt;/P&gt;&lt;P&gt;36&lt;/P&gt;&lt;/TD&gt;&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t;&lt;TD&gt;101004&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;-1.175&lt;/TD&gt;&lt;TD&gt;0.03274&lt;/TD&gt;&lt;TD&gt;-1.57381&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;42&lt;/TD&gt;&lt;TD&gt;101004&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;-1.3&lt;/TD&gt;&lt;TD&gt;0.03274&lt;/TD&gt;&lt;TD&gt;-1.57381&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;43&lt;/TD&gt;&lt;TD&gt;101004&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;-1.3&lt;/TD&gt;&lt;TD&gt;0.03274&lt;/TD&gt;&lt;TD&gt;-1.57381&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the existing GPLOT code (I'm leaving out the setup work for axes, legend, symbols, etc. to keep this post cleaner):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gplot data = lbplot;&amp;nbsp;&lt;BR /&gt;by trtn usubjid;&lt;BR /&gt;plot thresh*session=trtn /vaxis=axis2 haxis=axis1 frame legend=legend1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2017 22:28:47 GMT</pubDate>
    <dc:creator>davehalltwp</dc:creator>
    <dc:date>2017-11-02T22:28:47Z</dc:date>
    <item>
      <title>Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410034#M14035</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to add a regression line to a GPLOT scatter plot, one plot per subject.&amp;nbsp; I have the slope and intercept of the regression line.&amp;nbsp; Is there a simple way to add the line?&amp;nbsp; I was able to get it going with PROC SGPLOT, but the output in the RTF file is much rougher.&amp;nbsp; It would be preferable just to enhance the&amp;nbsp; GPLOT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is my data (for one patient):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;obs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;subjid&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;session&amp;nbsp; thresh&amp;nbsp; &amp;nbsp; &amp;nbsp;slope&amp;nbsp; &amp;nbsp; &amp;nbsp; intercpt&lt;BR /&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;35&lt;/P&gt;&lt;P&gt;36&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;101004&lt;/P&gt;&lt;P&gt;101004&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;-1.1750&lt;/P&gt;&lt;P&gt;-1.425&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0.03274&lt;/P&gt;&lt;P&gt;0.03274&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;-1.57381&lt;/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&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;43&lt;/TD&gt;&lt;TD&gt;101004&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;-1.3&lt;/TD&gt;&lt;TD&gt;0.03274&lt;/TD&gt;&lt;TD&gt;-1.57381&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the existing GPLOT code (I'm leaving out the setup work for axes, legend, symbols, etc. to keep this post cleaner):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gplot data = lbplot;&amp;nbsp;&lt;BR /&gt;by trtn usubjid;&lt;BR /&gt;plot thresh*session=trtn /vaxis=axis2 haxis=axis1 frame legend=legend1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 22:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410034#M14035</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-02T22:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410036#M14036</link>
      <description>&lt;P&gt;Can you use SGPLOT instead?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, it would be a single REG statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Sorry, I see you do have SGPLOT working. I would recommend sticking with that approach. I'm not sure what you meant by 'rougher' the output from SG procedures are much nicer than GPLOT in my experience. You can try changing the device, DPI or other settings to get better graphics, if necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 23:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410036#M14036</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-02T23:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410046#M14038</link>
      <description>&lt;P&gt;Thanks for the reply, Reeza.&amp;nbsp; Yeah, I could use SGPLOT I suppose.&amp;nbsp; I don't know why the .rtf file it generated doesn't look as good.&amp;nbsp; Maybe all the setup the program did applied to the GPLOT but doesn't get applied to the SGPLOT?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the REG line?&amp;nbsp; I tried something, I think maybe (PARMLINE?) and got a line, but it also insisted on printing a goofy box (giving the SLOPE and INTERCPT) on the plot that I couldn't suppress.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I wish I knew more about plotting and graphing...&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 00:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410046#M14038</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-03T00:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410051#M14040</link>
      <description>&lt;P&gt;Sometimes the default EMF Plus format output for RTF does not render very well.&amp;nbsp; However, you can use other image formats such as PNG.&amp;nbsp; Use OUTPUTFMT=PNG on the ODS Graphics statement.&amp;nbsp; Or, you can produce PDF output which also renders well.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 01:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410051#M14040</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-11-03T01:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410054#M14041</link>
      <description>&lt;P&gt;Thanks, Sanjay.&amp;nbsp; I'll see if those are options.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 01:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410054#M14041</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-03T01:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410057#M14042</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003155517.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003155517.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data=sashelp.class;
  reg x=height y=weight / CLM CLI;
run;&lt;/PRE&gt;&lt;P&gt;I haven't had a chance to test it, but I did a little research on Reeza's comment.&amp;nbsp; Does this REG statement produce a line based on the same SLOPE/INTERCEPT produced by PROC REG?&amp;nbsp; I know that's probably a really dumb question, but this seems too easy!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 02:02:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410057#M14042</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-03T02:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410058#M14043</link>
      <description>&lt;P&gt;None of the axis/legend statements that are used for the GRAPH procedures work for the SG procedures, they use their own syntax, which is easier to use in my opinion.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know much about graphing myself, but I know where to find examples and that's almost always my starting point. No one really writes code from scratch, do they? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf file='/folders/myfolders/sample.rtf' style=meadow;

ods graphics / imagefmt=png;

proc sgplot data=sashelp.class;
  reg x=height y=weight / nolegfit ;
run;

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n1gbe4z3i5l8hin1ajyvrwlcv00v.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1gbe4z3i5l8hin1ajyvrwlcv00v" target="_blank"&gt;http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n1gbe4z3i5l8hin1ajyvrwlcv00v.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1gbe4z3i5l8hin1ajyvrwlcv00v&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Graph tip sheet&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/rnd/app/ODSGraphics/TipSheet_ODSGraphics.pdf" target="_blank"&gt;http://support.sas.com/rnd/app/ODSGraphics/TipSheet_ODSGraphics.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS Graphics&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsbasicg.pdf?locale=en#nameddest=http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/" target="_blank"&gt;http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsbasicg.pdf?locale=en#nameddest=http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 02:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410058#M14043</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-03T02:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410059#M14044</link>
      <description>&lt;P&gt;Pretty sure, it's easy enough to check though, create the one through your previous method and the REG statement and see how they look. There's also a way to get the formula embedded if you want to be 100% sure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 02:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410059#M14044</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-03T02:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410060#M14045</link>
      <description>&lt;P&gt;Wow, Reeza, displaying the formula was actually something that was requested.&amp;nbsp; &amp;nbsp;I better look that up!&amp;nbsp; You all have been so helpful, thanks so much.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 02:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410060#M14045</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-03T02:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410062#M14046</link>
      <description>&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/02/27/slope-of-a-regression-line.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/02/27/slope-of-a-regression-line.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 02:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410062#M14046</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-03T02:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410144#M14049</link>
      <description>&lt;P&gt;The REG statement in SGPLOT does not share code with PROC REG.&amp;nbsp; Rather, the REG statement and PBSPLINE statement use the same code, which was originally written for the PBSPLINE transformation in PROC TRANSREG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of putting inset formulas into a fit plot.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_templt_sect017.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_templt_sect017.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 10:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410144#M14049</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-11-03T10:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410361#M14062</link>
      <description>&lt;P&gt;If you want to overlay in Proc GPLOT you can't specify a different data set than the scatter. You would need to use a Plot2 thresh*session=subjid and require a LOT of symbol statements to do the regression plots. (Overlay won't work with y*x=z type plots)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example combining a scatter plot and regression in sgplot.&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.class;
  scatter x=height y=weight;
  reg x=height y=weight / group=sex CLM CLI;
run;&lt;/PRE&gt;
&lt;P&gt;If want to use your regression data with scatter you will need to combine the data with the scatter and then delve into the joys of the Graphic Template Language to use the LINEPARM plot type&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 17:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410361#M14062</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-03T17:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410371#M14064</link>
      <description>&lt;P&gt;Try setting OUTPUTFMT=PNG and see if you like the RTF output better with SGPLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics / outputfmt=png;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 17:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410371#M14064</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-11-03T17:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410534#M14071</link>
      <description>&lt;P&gt;THanks to all.&amp;nbsp; My plot looks good!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 13:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410534#M14071</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-04T13:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to Add a line of Regression to a simple GPLOT Scatter Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410908#M14091</link>
      <description>&lt;P&gt;If you wanted to use gplot, you could annotate the line (and regression equation), and the annotate dataset could do that separately for each plot, based on the 'by' statement. (If you can share your data, and annotate dataset, I could create some code to do that for you.)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 16:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Syntax-to-Add-a-line-of-Regression-to-a-simple-GPLOT-Scatter/m-p/410908#M14091</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2017-11-06T16:16:21Z</dc:date>
    </item>
  </channel>
</rss>

