<?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 Show Up Refline for y2axis in PROC SGPLOT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Show-Up-Refline-for-y2axis-in-PROC-SGPLOT/m-p/900065#M355722</link>
    <description>&lt;P&gt;Syntax was almost right: You don't use axis=y2axis like in the series because you have the option is axis= not a bare name, so only need axis=y2.&lt;/P&gt;
&lt;PRE&gt;	proc sgplot data=test;
	series x=&amp;amp;xvar. y=y1/ lineattrs=(color=blue thickness=2.0 pattern=solid); 
	series x=&amp;amp;xvar. y=y2/y2axis lineattrs=(color=pink thickness=1.2 pattern=solid);  
	refline 100 /&lt;STRONG&gt;&lt;FONT color="#800080"&gt;axis=y2&lt;/FONT&gt;&lt;/STRONG&gt; lineattrs=(color=red thickness=2.0) ;
	run;quit;&lt;/PRE&gt;
&lt;P&gt;However the range of the values you show for the example data only has a range of 0 to 1 on the Y2 axis (right side of the graph)&amp;nbsp; so doesn't appear on the graph.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2023 03:10:38 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-10-26T03:10:38Z</dc:date>
    <item>
      <title>How to Show Up Refline for y2axis in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Show-Up-Refline-for-y2axis-in-PROC-SGPLOT/m-p/900060#M355721</link>
      <description>&lt;P&gt;I have code below, trying to show up refence line for y2axis. But it does not work. Any one know how?!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	data test;
	do i=1 to 1000;
		x=i;
		y1=sin(i*3.14159/100)*10+100;
		y2=cos(i*3.14159/100);
		output;
	end;
	run;quit;


	%let xvar=x;
	proc sgplot data=test;
	series x=&amp;amp;xvar. y=y1/ lineattrs=(color=blue thickness=2.0 pattern=solid); 
	series x=&amp;amp;xvar. y=y2/y2axis lineattrs=(color=pink thickness=1.2 pattern=solid);  
	refline 100 /axis=y2axis lineattrs=(color=red thickness=2.0) ;
	run;quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2023 02:12:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Show-Up-Refline-for-y2axis-in-PROC-SGPLOT/m-p/900060#M355721</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2023-10-26T02:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Show Up Refline for y2axis in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Show-Up-Refline-for-y2axis-in-PROC-SGPLOT/m-p/900065#M355722</link>
      <description>&lt;P&gt;Syntax was almost right: You don't use axis=y2axis like in the series because you have the option is axis= not a bare name, so only need axis=y2.&lt;/P&gt;
&lt;PRE&gt;	proc sgplot data=test;
	series x=&amp;amp;xvar. y=y1/ lineattrs=(color=blue thickness=2.0 pattern=solid); 
	series x=&amp;amp;xvar. y=y2/y2axis lineattrs=(color=pink thickness=1.2 pattern=solid);  
	refline 100 /&lt;STRONG&gt;&lt;FONT color="#800080"&gt;axis=y2&lt;/FONT&gt;&lt;/STRONG&gt; lineattrs=(color=red thickness=2.0) ;
	run;quit;&lt;/PRE&gt;
&lt;P&gt;However the range of the values you show for the example data only has a range of 0 to 1 on the Y2 axis (right side of the graph)&amp;nbsp; so doesn't appear on the graph.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 03:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Show-Up-Refline-for-y2axis-in-PROC-SGPLOT/m-p/900065#M355722</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-26T03:10:38Z</dc:date>
    </item>
  </channel>
</rss>

