<?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 Regression plot using GPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172265#M6379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following script to plot regression models, but there are four main problems that I could not figure out using the available manuals:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove minor ticks in both axis.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp; Include the linear regression model inside the graph using three decimal cases and rename the variables, i.e., Y = a – bx (R2 = 0.003).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;3)&amp;nbsp;&amp;nbsp;&amp;nbsp; Graph frame should be thicker.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;4)&amp;nbsp;&amp;nbsp;&amp;nbsp; Size of the number of both axis should size 12pt.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I included the current output and the desired graph to ilustrate what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for considering helping.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="current_graph.jpg" class="jive-image-thumbnail jive-image" height="416" src="https://communities.sas.com/legacyfs/online/4915_current_graph.jpg" width="560" /&gt;.&lt;IMG alt="desired_graph.jpg" class="jive-image-thumbnail jive-image" height="394" src="https://communities.sas.com/legacyfs/online/4914_desired_graph.jpg" width="599" /&gt;&lt;/P&gt;&lt;P&gt;LEGEND1 value=(f=times h=12pt)&lt;/P&gt;&lt;P&gt;POSITION= (bottom center inside) &lt;/P&gt;&lt;P&gt;MODE=protect&lt;/P&gt;&lt;P&gt;noframe;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AXIS1 major =(h=1) &lt;/P&gt;&lt;P&gt;order=(0 to 3600 by 400)&lt;/P&gt;&lt;P&gt;LABEL=(ANGLE=360 ROTATE=0 HEIGHT=14pt font=times 'Cumulative aphid-days');&lt;/P&gt;&lt;P&gt;SYMBOL1 pointlabel = ("#Plot" h=2 font=times h=10pt color=black)&amp;nbsp; value=none I=RL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AXIS2 major =(h=1)&lt;/P&gt;&lt;P&gt;order=(0 to 1 by 0.2)&lt;/P&gt;&lt;P&gt;LABEL=(ANGLE=90 ROTATE=0 HEIGHT=14pt font=times 'NDVI');&lt;/P&gt;&lt;P&gt;SYMBOL2 color=black font=times;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=ALLOPENP; BY DateA Place; RUN;&lt;/P&gt;&lt;P&gt;proc gplot data=ALLOPENP; BY DateA Place;&lt;/P&gt;&lt;P&gt;plot NDVI*CUMADAYTaphid/&lt;/P&gt;&lt;P&gt;haxis =axis1&amp;nbsp; &lt;/P&gt;&lt;P&gt;vaxis =axis2 &lt;/P&gt;&lt;P&gt;caxis=black&lt;/P&gt;&lt;P&gt;regeqn &lt;/P&gt;&lt;P&gt;legend=legend1;&lt;/P&gt;&lt;P&gt;run;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Feb 2014 19:00:30 GMT</pubDate>
    <dc:creator>TMAlves</dc:creator>
    <dc:date>2014-02-12T19:00:30Z</dc:date>
    <item>
      <title>Regression plot using GPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172265#M6379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following script to plot regression models, but there are four main problems that I could not figure out using the available manuals:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove minor ticks in both axis.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp; Include the linear regression model inside the graph using three decimal cases and rename the variables, i.e., Y = a – bx (R2 = 0.003).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;3)&amp;nbsp;&amp;nbsp;&amp;nbsp; Graph frame should be thicker.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;4)&amp;nbsp;&amp;nbsp;&amp;nbsp; Size of the number of both axis should size 12pt.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I included the current output and the desired graph to ilustrate what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for considering helping.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="current_graph.jpg" class="jive-image-thumbnail jive-image" height="416" src="https://communities.sas.com/legacyfs/online/4915_current_graph.jpg" width="560" /&gt;.&lt;IMG alt="desired_graph.jpg" class="jive-image-thumbnail jive-image" height="394" src="https://communities.sas.com/legacyfs/online/4914_desired_graph.jpg" width="599" /&gt;&lt;/P&gt;&lt;P&gt;LEGEND1 value=(f=times h=12pt)&lt;/P&gt;&lt;P&gt;POSITION= (bottom center inside) &lt;/P&gt;&lt;P&gt;MODE=protect&lt;/P&gt;&lt;P&gt;noframe;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AXIS1 major =(h=1) &lt;/P&gt;&lt;P&gt;order=(0 to 3600 by 400)&lt;/P&gt;&lt;P&gt;LABEL=(ANGLE=360 ROTATE=0 HEIGHT=14pt font=times 'Cumulative aphid-days');&lt;/P&gt;&lt;P&gt;SYMBOL1 pointlabel = ("#Plot" h=2 font=times h=10pt color=black)&amp;nbsp; value=none I=RL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AXIS2 major =(h=1)&lt;/P&gt;&lt;P&gt;order=(0 to 1 by 0.2)&lt;/P&gt;&lt;P&gt;LABEL=(ANGLE=90 ROTATE=0 HEIGHT=14pt font=times 'NDVI');&lt;/P&gt;&lt;P&gt;SYMBOL2 color=black font=times;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SORT DATA=ALLOPENP; BY DateA Place; RUN;&lt;/P&gt;&lt;P&gt;proc gplot data=ALLOPENP; BY DateA Place;&lt;/P&gt;&lt;P&gt;plot NDVI*CUMADAYTaphid/&lt;/P&gt;&lt;P&gt;haxis =axis1&amp;nbsp; &lt;/P&gt;&lt;P&gt;vaxis =axis2 &lt;/P&gt;&lt;P&gt;caxis=black&lt;/P&gt;&lt;P&gt;regeqn &lt;/P&gt;&lt;P&gt;legend=legend1;&lt;/P&gt;&lt;P&gt;run;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 19:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172265#M6379</guid>
      <dc:creator>TMAlves</dc:creator>
      <dc:date>2014-02-12T19:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regression plot using GPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172266#M6380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove minor ticks in both axis.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;axis2 minor=none;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp; Include the linear regression model inside the graph using three decimal cases and rename the variables, i.e., Y = a – bx (R2 = 0.003).&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;You'll probably have to calculate the values, and then stuff them into a custom text string, and annotate it onto the graph.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;3)&amp;nbsp;&amp;nbsp;&amp;nbsp; Graph frame should be thicker.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;axis2 width=2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;4)&amp;nbsp;&amp;nbsp;&amp;nbsp; Size of the number of both axis should size 12pt.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;axis2 value=(height=12pt)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 20:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172266#M6380</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2014-02-12T20:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regression plot using GPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172267#M6381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Considering your suggestion for question (2), I calculated the values and called them in a macro variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I have a BY statement and the macro variable saved only the last intercept and slope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any idea how to save the values for each DATE and PLACE? I am thinking to use each value in a custom text string onto the graph.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC REG DATA=ALLOPENP; BY DateA Place;&lt;/P&gt;&lt;P&gt;MODEL NDVI=CUMADAYTaphid;&lt;/P&gt;&lt;P&gt;ODS OUTPUT ParameterEstimates=estimates FitStatistics=stats;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA reg_results; MERGE estimates stats; BY DateA Place;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if variable="CUMADAYTaphid" then call symput("slope", estimate);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if variable="Intercept" then call symput("intercept", estimate);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Label2="R-Square" then call symput("rsquare", cValue2);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 20:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172267#M6381</guid>
      <dc:creator>TMAlves</dc:creator>
      <dc:date>2014-02-12T20:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Regression plot using GPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172268#M6382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to add in an N to your slope, so that you have multiple slope macro variables, ie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;slope1 slope2 ... slopeN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA reg_results; MERGE estimates stats; BY DateA Place;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if variable="CUMADAYTaphid" then call symput("slope"||put(_n_,2. -l), estimate);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if variable="Intercept" then call symput("intercept"||put(_n_,2. -l), estimate);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Label2="R-Square" then call symput("rsquare"||put(_n_,2. -l), cValue2);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 20:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172268#M6382</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-12T20:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regression plot using GPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172269#M6383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For putting a regression equation on each graph, have a look at the ANNOTATE facility. You can use that with BY group processing, so once you have figured out how to use it for one graph (takes a bit of work) it should be straight foward getting what you want for all the graphs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 19:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression-plot-using-GPLOT/m-p/172269#M6383</guid>
      <dc:creator>KenDodds</dc:creator>
      <dc:date>2014-02-13T19:29:50Z</dc:date>
    </item>
  </channel>
</rss>

