<?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: Multiple Reference Line inside SGPLOT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899708#M355584</link>
    <description>SAS DOC gives out example below. Somehow I tried and did not show up?!&lt;BR /&gt;proc sgplot data=out;&lt;BR /&gt;   scatter x=s y=residual_q;&lt;BR /&gt;   refline 0 / axis=y;&lt;BR /&gt;run;</description>
    <pubDate>Tue, 24 Oct 2023 02:46:31 GMT</pubDate>
    <dc:creator>hellohere</dc:creator>
    <dc:date>2023-10-24T02:46:31Z</dc:date>
    <item>
      <title>Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/884185#M349283</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;refline 2800/axis=x lineattrs=(color=red thickness=2.0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;DOES one reference line inside SGPLOT. I am running a macro, need generate SGPLOT with multiple reference lines and the values are&lt;/P&gt;
&lt;P&gt;varied (upto macro outcome).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone knows how, assume the macro saves out reference line values into a set of macro variables, refvalues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 13:32:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/884185#M349283</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2023-07-10T13:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/884189#M349286</link>
      <description>&lt;P&gt;One way I can think of is to store the refvalues into a dataset, and generate a text line for each reference value, and then passes into&lt;/P&gt;
&lt;P&gt;PROC SGPLOT ... tedious though. Any straightforward way?!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 13:35:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/884189#M349286</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2023-07-10T13:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/884197#M349292</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you modify the macro so that it concatenates the reference line values into a single macro variable? Then you could just refer to that macro variable in the REFLINE statement, as shown in the example below (which also uses optional labels for the reference lines).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let refvalues=57.5 62.8 66.5; 
%let reflabels="Q1" "Median" "Q3";

proc sgplot data=sashelp.class;
scatter x=height y=weight;
refline &amp;amp;refvalues / axis=x label=(&amp;amp;reflabels) labelloc=inside;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jul 2023 14:20:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/884197#M349292</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-07-10T14:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899707#M355583</link>
      <description>How to make a HREF(Horizontal RefLine)?! at y-axis, say y=100?</description>
      <pubDate>Tue, 24 Oct 2023 02:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899707#M355583</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2023-10-24T02:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899708#M355584</link>
      <description>SAS DOC gives out example below. Somehow I tried and did not show up?!&lt;BR /&gt;proc sgplot data=out;&lt;BR /&gt;   scatter x=s y=residual_q;&lt;BR /&gt;   refline 0 / axis=y;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 24 Oct 2023 02:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899708#M355584</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2023-10-24T02:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899719#M355586</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How to make a HREF(Horizontal RefLine)?! at y-axis, say y=100?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Add the statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;refline 100;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to the PROC SGPLOT step in my solution. The &lt;FONT face="courier new,courier"&gt;axis=y&lt;/FONT&gt; option is not necessary (but can be used for clarity) because the default axis for reference lines is the y-axis.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 07:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899719#M355586</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-10-24T07:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899760#M355606</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
That is due to your variable "residual_q" did not contains ZERO.
Add option NOCLIP in it.
*/


proc sgplot data=sashelp.class;
scatter x=weight y=height;
refline 0 / axis=y NOCLIP ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Oct 2023 11:26:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/899760#M355606</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-10-24T11:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/900054#M355718</link>
      <description>thanks for reply.

It still does not show up. The issue might be that I am using y2axis. Still confusing though...</description>
      <pubDate>Thu, 26 Oct 2023 01:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/900054#M355718</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2023-10-26T01:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Reference Line inside SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/900082#M355729</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;thanks for reply. It still does not show up. The issue might be that I am using y2axis.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then specify &lt;FONT face="courier new,courier"&gt;axis=&lt;STRONG&gt;y2&lt;/STRONG&gt;&lt;/FONT&gt; as in the example below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%let refvalues=57.5 62.8 66.5; 
%let reflabels="Q1" "Median" "Q3";

proc sgplot data=sashelp.class;
scatter x=height y=weight &lt;STRONG&gt;/ y2axis&lt;/STRONG&gt;;
refline &amp;amp;refvalues / axis=x label=(&amp;amp;reflabels) labelloc=inside;
refline 100 &lt;STRONG&gt;/ axis=y2 label="Your label" labelloc=inside&lt;/STRONG&gt;;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 06:23:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Reference-Line-inside-SGPLOT/m-p/900082#M355729</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-10-26T06:23:24Z</dc:date>
    </item>
  </channel>
</rss>

