<?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 two reference lines in proc sqplot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/two-reference-lines-in-proc-sqplot/m-p/912042#M359598</link>
    <description>&lt;DIV&gt;I tried to use thee following code to add two reference lines in thee plot, why the label for second line doesn't show in the plot?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;proc sgplot data=indata;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; series x=visit y=result/group=usubjid datalabelattrs=(size=12pt) markers markerattrs=(size=12pt symbol=trianglefilled)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; lineattrs=(thickness=3 pattern=solid) name="series_name";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; keylegend "series_name" / valueattrs=(size=14);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; refline 0 / axis=y lineattrs=(thickness=3 pattern=dash) label=("Upper Level of Healthy");&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; refline LLOQn / axis=y lineattrs=(thickness=3 pattern=dash) label=("LLOQ") labelloc=inside;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; xaxis label="Visit" labelattrs=(size=16pt) VALUEATTRS=(Size=12&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Weight=Bold);&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; yaxis label="sample data" labelattrs=(size=16pt) VALUEATTRS=( Size=12&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Weight=Bold);&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;</description>
    <pubDate>Thu, 18 Jan 2024 23:02:55 GMT</pubDate>
    <dc:creator>jojo</dc:creator>
    <dc:date>2024-01-18T23:02:55Z</dc:date>
    <item>
      <title>two reference lines in proc sqplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-reference-lines-in-proc-sqplot/m-p/912042#M359598</link>
      <description>&lt;DIV&gt;I tried to use thee following code to add two reference lines in thee plot, why the label for second line doesn't show in the plot?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;proc sgplot data=indata;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; series x=visit y=result/group=usubjid datalabelattrs=(size=12pt) markers markerattrs=(size=12pt symbol=trianglefilled)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; lineattrs=(thickness=3 pattern=solid) name="series_name";&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; keylegend "series_name" / valueattrs=(size=14);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; refline 0 / axis=y lineattrs=(thickness=3 pattern=dash) label=("Upper Level of Healthy");&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; refline LLOQn / axis=y lineattrs=(thickness=3 pattern=dash) label=("LLOQ") labelloc=inside;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; xaxis label="Visit" labelattrs=(size=16pt) VALUEATTRS=(Size=12&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Weight=Bold);&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; yaxis label="sample data" labelattrs=(size=16pt) VALUEATTRS=( Size=12&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Weight=Bold);&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jan 2024 23:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-reference-lines-in-proc-sqplot/m-p/912042#M359598</guid>
      <dc:creator>jojo</dc:creator>
      <dc:date>2024-01-18T23:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: two reference lines in proc sqplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-reference-lines-in-proc-sqplot/m-p/912044#M359600</link>
      <description>&lt;P&gt;You may have to provide actual data to diagnose this. What does your LOG show when you run this code? Copy the text from the log window of the code and all the notes or other messages and paste the result into a text box opened on the forum with the &amp;lt;/&amp;gt; icon that appears above the message window. The text box preserves diagnostic messages better than the main message window which will reformat pasted text and remove spaces and possibly replace characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: What is the value(s) for the variable LLOQN and the maximum and minimum of the variable Result?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 23:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-reference-lines-in-proc-sqplot/m-p/912044#M359600</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-01-18T23:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: two reference lines in proc sqplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-reference-lines-in-proc-sqplot/m-p/912057#M359603</link>
      <description>&lt;P&gt;I ran this similar code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
  series x=height y=weight;
  refline 0 / axis=y lineattrs=(thickness=3 pattern=dash) label=("Upper Level of Healthy") noclip;
  refline age / axis=y lineattrs=(thickness=3 pattern=dash) label=("LLOQ") labelloc=inside noclip;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And there is a NOTE in the log explaining why the label for the second refline statement is not created:&lt;/P&gt;
&lt;PRE&gt;NOTE: CURVELABEL='LLOQ' is invalid. The option value cannot be a string when a column of reference lines is plotted. The label
      will not be drawn.
&lt;/PRE&gt;
&lt;P&gt;When you specify the refline as a variable, it suggests that you want to create mutiple reference lines, one for each value in the variable.&amp;nbsp; It wouldn't make sense to apply one label, "LLOQ" to multiple reference lines. When you use refline variable, SGPLOT expects you to use label=variable, not label="text string".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this code "works":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
  series x=height y=weight;
  refline 0 / axis=y lineattrs=(thickness=3 pattern=dash) label=("Upper Level of Healthy") noclip;
  refline age / axis=y lineattrs=(thickness=3 pattern=dash) label=name labelloc=inside noclip;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(The plot is nonsensical and the labels collide, but they are printed.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 04:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-reference-lines-in-proc-sqplot/m-p/912057#M359603</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-01-19T04:18:15Z</dc:date>
    </item>
  </channel>
</rss>

