<?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 How to do multiple refline with varied colors by flag?! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976438#M378334</link>
    <description>&lt;P&gt;I have a time-series dataset[time=i; Y=tsvar], attached.&lt;/P&gt;
&lt;P&gt;I need have multiple reference at column=refind,&lt;/P&gt;
&lt;P&gt;AND if refcolor=max, color=lime, if refcolor=min, color=blue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sc.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/110409i6096969CF5D2B184/image-size/large?v=v2&amp;amp;px=999" role="button" title="sc.jpg" alt="sc.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Oct 2025 03:52:47 GMT</pubDate>
    <dc:creator>hellohere</dc:creator>
    <dc:date>2025-10-06T03:52:47Z</dc:date>
    <item>
      <title>How to do multiple refline with varied colors by flag?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976438#M378334</link>
      <description>&lt;P&gt;I have a time-series dataset[time=i; Y=tsvar], attached.&lt;/P&gt;
&lt;P&gt;I need have multiple reference at column=refind,&lt;/P&gt;
&lt;P&gt;AND if refcolor=max, color=lime, if refcolor=min, color=blue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sc.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/110409i6096969CF5D2B184/image-size/large?v=v2&amp;amp;px=999" role="button" title="sc.jpg" alt="sc.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 03:52:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976438#M378334</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2025-10-06T03:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple refline with varied colors by flag?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976442#M378336</link>
      <description>&lt;P&gt;Please post the code you use for your graph.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 08:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976442#M378336</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-10-06T08:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple refline with varied colors by flag?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976443#M378337</link>
      <description>proc sgplot data=_test dattrmap=mymap; 
	series x=i y=tsvar /lineattrs=(color=red thickness=2 pattern=solid); 
	refline  refind/axis=x lineattrs=(thickness=2 pattern=solid); 
run;quit;



Wanted: the refline for max and min shows up with diff color. Here only one color.</description>
      <pubDate>Mon, 06 Oct 2025 09:15:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976443#M378337</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2025-10-06T09:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple refline with varied colors by flag?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976455#M378339</link>
      <description>&lt;P&gt;I think we need to see the code that creates data set MYMAP. Please post code in the proper code box (it has the little running man icon) as you did in earlier threads.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 11:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976455#M378339</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-10-06T11:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple refline with varied colors by flag?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976464#M378341</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x v9 'C:\Users\xiakeshan\Documents\Downloads';

data have;
 set x._test;
 if refcolor='max' then max=refind;
 if refcolor='min' then min=refind;
run;
proc sgplot data=have ; *dattrmap=mymap; 
series x=i y=tsvar /lineattrs=(color=red thickness=2 pattern=solid); 
refline max/axis=x lineattrs=(thickness=2 pattern=solid color=lime) ; 
refline min/axis=x lineattrs=(thickness=2 pattern=solid color=blue) ; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1759753631714.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/110420iAA4033F8C2EE7D52/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1759753631714.png" alt="Ksharp_0-1759753631714.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 12:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976464#M378341</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-10-06T12:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple refline with varied colors by flag?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976465#M378342</link>
      <description>Thanks. Nice skip around.</description>
      <pubDate>Mon, 06 Oct 2025 12:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-multiple-refline-with-varied-colors-by-flag/m-p/976465#M378342</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2025-10-06T12:43:44Z</dc:date>
    </item>
  </channel>
</rss>

