<?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: how to add curvelabels if group= option was applied in regressionplot? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302977#M10688</link>
    <description>&lt;P&gt;Thank you for your suggestions! Unfortunately my SAS version is 9.4 1M2. But I will try&amp;nbsp;&lt;SPAN&gt; SCATTERPLOT to display the label of the last point value. This should work. Thank you again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 15:56:42 GMT</pubDate>
    <dc:creator>ttmei</dc:creator>
    <dc:date>2016-10-06T15:56:42Z</dc:date>
    <item>
      <title>how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302536#M10664</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to add curvelabels to several regression lines. As mentioned above, I used "regressionplot" and "group=" option. The&lt;SPAN&gt; "group=" option conflicted with the "curvelabel=" option.&lt;/SPAN&gt;&amp;nbsp;I may also nested&amp;nbsp;"drawtext" in the layout overlay. But if I want to change the size of the figure, the nested&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;drawtext" will not automaticly&amp;nbsp;fit the size. Is there a better way to fix this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ttmei&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My code:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template; 
	define statgraph ttmei; 

		begingraph /designwidth=700px designheight=300px border=false; 

			      discreteattrmap name="scatter1" /ignorecase=true;
				  	 value "600-650" / markerattrs=(symbol=circle  size=8 color=blue) lineattrs=(thickness=2 color=blue);
				  	 value "650-700" / markerattrs=(symbol=circle size=8  color=cxff00ff) lineattrs=(thickness=2 color=cxff00ff);
				  	 value "700-750" / markerattrs=(symbol=circle  size=8 color=orange) lineattrs=(thickness=2 color=orange);
				  	 value "750-800" / markerattrs=(symbol=circle size=8  color=green) lineattrs=(thickness=2 color=green) ;
				  	 value "800-850" / markerattrs=(symbol=circle size=8  color=black) lineattrs=(thickness=2 color=black) ;
				  	 value "850-900" / markerattrs=(symbol=circle size=8  color=brown) lineattrs=(thickness=2 color=brown) ;
				  	 value "900-950" / markerattrs=(symbol=circle size=8  color=yellow) lineattrs=(thickness=2 color=yellow) ;
				  	 value "950-1000" / markerattrs=(symbol=circle size=8  color=red) lineattrs=(thickness=2 color=red) ;
				  	 value "1000-1100" / markerattrs=(symbol=circle size=8  color=purple) lineattrs=(thickness=2 color=purple) ;
				  	 value "1100-1300" / markerattrs=(symbol=circle size=8  color=darkgreen) lineattrs=(thickness=2 color=darkgreen) ;
			      discreteattrvar attrvar=scatter var=dor attrmap="scatter1";

			layout lattice /rows=1 columns=2;

				layout overlay/
					yaxisopts=(display=(ticks tickvalues line) offsetmin=0.1 offsetmax=0 tickvalueattrs=(FAMILY="Arial" SIZE=10pt)
							linearopts=(viewmin= 0 viewmax=0.6 thresholdmin=0) labelattrs=(FAMILY="Arial" SIZE=10pt))
					xaxisopts=(display=(ticks tickvalues line) offsetmin=0 offsetmax=0 tickvalueattrs=(FAMILY="Arial" SIZE=10pt)
							linearopts=(viewmin= 0 viewmax=1 thresholdmin=0) labelattrs=(FAMILY="Arial" SIZE=10pt)); 
					scatterplot  y=kx x=Mf/group=scatter name="dot1"; 
					regressionplot y=kx x=Mf/group=scatter  name="line1";
/*					mergedlegend "dot1" "line1"/title="Dry density" exclude=( "500-600" "1400-1700" ".") location=inside border=false across=2 halign=right valign=bottom*/
/*													valueattrs=(size=10);	*/
					entry halign=left "(A)"/location=inside valign=top textattrs=(family="Arial" size=10pt) ;	
				 endlayout; 

				layout overlay/
					yaxisopts=(display=(ticks tickvalues line label) label="Tc/Dd" offsetmin=0 offsetmax=0 tickvalueattrs=(FAMILY="Arial" SIZE=10pt)
							linearopts=(viewmin= 0.2 viewmax=0.8 thresholdmin=0) labelattrs=(FAMILY="Arial" SIZE=10pt))
					xaxisopts=(display=(ticks tickvalues line) offsetmin=0 offsetmax=0 tickvalueattrs=(FAMILY="Arial" SIZE=10pt)
							linearopts=(viewmin= 0 viewmax=1 thresholdmin=0) labelattrs=(FAMILY="Arial" SIZE=10pt)); 
					scatterplot x=mf y=cd/ markerattrs=(symbol=circle size=8 color=black);
					regressionplot x=mf y=cd/lineattrs=(thickness=2 color=black) ;
					entry halign=left "(B)"/location=inside valign=top textattrs=(family="Arial" size=10pt) ;	
					layout gridded/columns=1 rows=2 location=inside halign=right valign=bottom;
		                 entry  halign=right "Y=0.32X+0.31"/
								textattrs=(family="Arial" size=10pt);
		                 entry  halign=right "R"{sup '2'}"=0.99; P&amp;lt;0.05"/
								textattrs=(family="Arial" size=10pt);
				    endlayout;
				 endlayout; 

		       rowheaders;
		                 entry "Tc (W m" {sup '-1'} " K" {sup '-1'}")" /rotate=90 textattrs=(family="Arial" size=10pt);
		       endrowheaders;

		        sidebar / align=bottom;
			        entry halign=center "Wc (g g"{sup '-1'}")"/valign=bottom location=outside
			              textattrs=(FAMILY="Arial" SIZE=10pt) pad=(bottom=8px);
		        endsidebar;

			endlayout; 
		endgraph; 
	end; 
run; 
ods  html image_dpi=300  ;
proc sgrender data=tcmax.tc template="ttmei" ; 
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 09:12:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302536#M10664</guid>
      <dc:creator>ttmei</dc:creator>
      <dc:date>2016-10-05T09:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302537#M10665</link>
      <description>&lt;P&gt;Well, I had a quick search on the blog for graphs:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/?s=curvelabels" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/?s=curvelabels&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There is a tag at the bottom for full code examples. &amp;nbsp;They are SGPLOT, however with the tmplout= option on proc sgplot you can see the underlying template code generated (I find that is a quick way to find syntax). &amp;nbsp;Would markerchar work?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 08:52:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302537#M10665</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-05T08:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302547#M10668</link>
      <description>&lt;P&gt;Thank you for your reply. I have tried "markerchar" and it's not work in regressionplot. Sorry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ttmei&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 09:06:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302547#M10668</guid>
      <dc:creator>ttmei</dc:creator>
      <dc:date>2016-10-05T09:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302550#M10670</link>
      <description>&lt;P&gt;Sorry, I don't understand "its not work in regression", do you mean its not an optin for that type of graph? &amp;nbsp;If so then just add a scatter over the reg plot with options you need, and set the scattter to have very small points so they don't show. &amp;nbsp;That is a basic concept of GTL is that you overlay various graphs with various options to get output you want, one statement is generally not going to do everything.&lt;/P&gt;
&lt;P&gt;For instance, you could pull reg values out from a proc reg step, then use that data to plot an scatter.&lt;/P&gt;
&lt;P&gt;proc reg...;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; model...;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ods output ParameterEsitmates=pe...;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc sgplot...&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 09:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302550#M10670</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-05T09:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302670#M10677</link>
      <description>&lt;P&gt;Which version of SAS are you running. There have been notable enhancements for graphics options in the last couple of releases.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 14:29:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302670#M10677</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-05T14:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302948#M10686</link>
      <description>&lt;P&gt;It would help if you add the full program with data to see what you are getting and what you want. &amp;nbsp;it also helps to know what SAS release you have. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, CURVELABEL=string is used to put a string curve label for non-grouped case. &amp;nbsp;If you want to label each regression curve by the group value, I suggest you use an overlaid SCATTERPLOT that has only the the point you want (maybe last) with a DATALABEL=column&amp;nbsp;to display the group values. &amp;nbsp;You can set the markersize for the scatter to zero. &amp;nbsp;With SAS 9.4M3, you can also use TEXTPLOT.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 14:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302948#M10686</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-10-06T14:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302975#M10687</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm using SAS 9.4 1M2.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302975#M10687</guid>
      <dc:creator>ttmei</dc:creator>
      <dc:date>2016-10-06T15:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302977#M10688</link>
      <description>&lt;P&gt;Thank you for your suggestions! Unfortunately my SAS version is 9.4 1M2. But I will try&amp;nbsp;&lt;SPAN&gt; SCATTERPLOT to display the label of the last point value. This should work. Thank you again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302977#M10688</guid>
      <dc:creator>ttmei</dc:creator>
      <dc:date>2016-10-06T15:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to add curvelabels if group= option was applied in regressionplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302978#M10689</link>
      <description>&lt;P&gt;Yes, I think add a scatter on the reg line is a good idea. Should work. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 16:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-add-curvelabels-if-group-option-was-applied-in/m-p/302978#M10689</guid>
      <dc:creator>ttmei</dc:creator>
      <dc:date>2016-10-06T16:00:33Z</dc:date>
    </item>
  </channel>
</rss>

