<?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: SGPANEL Spaghetti Plot - Different Colors for all Lines in Each Panel in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967583#M25563</link>
    <description>I got it - GROUPMC option. Thanks!</description>
    <pubDate>Wed, 28 May 2025 13:11:50 GMT</pubDate>
    <dc:creator>_Hopper</dc:creator>
    <dc:date>2025-05-28T13:11:50Z</dc:date>
    <item>
      <title>SGPANEL Spaghetti Plot - Different Colors for all Lines in Each Panel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967546#M25560</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code below works fine, however, I would like the lines in each panel to be a different color. Do I need to annotate to get that result?&lt;/P&gt;
&lt;P&gt;GRX is a formatted numeric value and has four levels (one panel for each value of GRX).&lt;/P&gt;
&lt;P&gt;Pressure is an integer values ranging from zero to a maximum of around 30. Each value if ID is a time series for a different set of measurements.&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; proc sgpanel data= plot noautolegend ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; panelby trt&amp;nbsp; / rows=2 columns=2 sort=(ascending ) headerattrs = (size = 7pt family = "Courier New");&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; styleattrs datasymbols=(CircleFilled) datacontrastcolors=(black)&amp;nbsp; datalinepatterns=(solid);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rowaxis&amp;nbsp; VALUES= (0 to 40 by 2)&amp;nbsp; grid&amp;nbsp; GRIDATTRS=(color=ltgray pattern=solid)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; labelattrs = (size = 7pt family = "Courier New") valueattrs = (size = 7pt family = "Courier New")&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label = "Pressure";&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; colaxis&amp;nbsp; VALUES= (0 1 3 6 9 12 13 15) VALUESHINT grid&amp;nbsp; GRIDATTRS=(color=ltgray pattern=solid)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; labelattrs = (size = 7pt family = "Courier New") valueattrs = (size = 7pt family = "Courier New");&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; series&amp;nbsp; x= MONTH y= pressure / group=id lineattrs=(thickness=1)&amp;nbsp; ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; scatter x= MONTH y=pressure / group=id markerattrs=(size=6pt) ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 22:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967546#M25560</guid>
      <dc:creator>_Hopper</dc:creator>
      <dc:date>2025-05-27T22:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL Spaghetti Plot - Different Colors for all Lines in Each Panel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967548#M25561</link>
      <description>&lt;P&gt;First you will want to combine the SCATTER and SERIES statements:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;series&amp;nbsp; x= MONTH y= pressure / group=id lineattrs=(thickness=1) &amp;nbsp;markers markerattrs=(size=6pt);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want all of the lines in each cell to be same color, add GROUPLC=trt (the PANELBY&lt;/SPAN&gt;&amp;nbsp;variable) to the SERIES statement. If you want each line in the panel to have a unique color, create a new variable with unique values (e.g. 1, 2, 3, etc.) and assign it to the GROUPLC option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 23:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967548#M25561</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-05-27T23:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL Spaghetti Plot - Different Colors for all Lines in Each Panel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967582#M25562</link>
      <description>&lt;P&gt;This helps but the colors are not quite correct. The line colors are fine (I want alternating blue and green in each panel) however, the markers are mixed in each panel. Most match the line colors but some do not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I missing?&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 13:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967582#M25562</guid>
      <dc:creator>_Hopper</dc:creator>
      <dc:date>2025-05-28T13:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: SGPANEL Spaghetti Plot - Different Colors for all Lines in Each Panel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967583#M25563</link>
      <description>I got it - GROUPMC option. Thanks!</description>
      <pubDate>Wed, 28 May 2025 13:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPANEL-Spaghetti-Plot-Different-Colors-for-all-Lines-in-Each/m-p/967583#M25563</guid>
      <dc:creator>_Hopper</dc:creator>
      <dc:date>2025-05-28T13:11:50Z</dc:date>
    </item>
  </channel>
</rss>

