<?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: Proc SGPANEL color by subject in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/750760#M21696</link>
    <description>&lt;P&gt;Moved to Graphics community&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jun 2021 09:05:15 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-06-28T09:05:15Z</dc:date>
    <item>
      <title>Proc SGPANEL color by subject</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/749641#M21695</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to generate a figure plot using the below code. I am getting the output as in the attached screen shot.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgpanel data=have&amp;nbsp; ;&lt;BR /&gt;panelby SUBJID / layout=PANEL novarname columns=4 rows=2;&lt;BR /&gt;series x=x_axis_var y=aval /group=trt01p_ attrid=myid lineattrs=(pattern=mediumdash thickness=2);&lt;BR /&gt;scatter x=x_axis_var y=aval /group=trt01p_ attrid=myid markerattrs = (symbol=circlefilled size=8);&lt;/P&gt;&lt;P&gt;rowaxis integer grid values=(0,50,75,100) label="test";&lt;BR /&gt;colaxis integer grid values=(1 to 10 by 1) discreteorder=data label="Day";&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My query is how can we change the Blue color plots 'Green', Red color plots to 'Blue' and the bottom Legend with Green and Blue colors?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="csa_1-1624381705014.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60629i2B891448A2406865/image-size/medium?v=v2&amp;amp;px=400" role="button" title="csa_1-1624381705014.png" alt="csa_1-1624381705014.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 17:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/749641#M21695</guid>
      <dc:creator>csa</dc:creator>
      <dc:date>2021-06-22T17:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPANEL color by subject</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/750760#M21696</link>
      <description>&lt;P&gt;Moved to Graphics community&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 09:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/750760#M21696</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-28T09:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPANEL color by subject</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/750774#M21697</link>
      <description>&lt;P&gt;Looks like duplicate of this solved one(?)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/749650#M21676" target="_blank"&gt;https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/749650#M21676&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 11:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/750774#M21697</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-06-28T11:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPANEL color by subject</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/750776#M21698</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/310282"&gt;@csa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compared to the &lt;A href="https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/749650/highlight/true#M21676" target="_blank" rel="noopener"&gt;other thread&lt;/A&gt;, you inserted the &lt;FONT face="courier new,courier"&gt;attrid=myid&lt;/FONT&gt; option into the SERIES and SCATTER statements. However, without using the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p121sy0a2jycdfn13zygo90opvra.htm#p1hhs1pivx0f84n19lsr21gglscd" target="_blank" rel="noopener"&gt;DATTRMAP= option&lt;/A&gt; in the SGPANEL statement there's nothing that "&lt;FONT face="courier new,courier"&gt;myid&lt;/FONT&gt;" refers to. So, in addition to this option you need an attribute map dataset, as described in&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p0k06baqdy4vinn1kqup9wsmuqc0.htm" target="_blank" rel="noopener"&gt;Example: Create a Panel That Uses an Attribute Map&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;data attrmap;
retain ID "myid";
input value markercolor $ linecolor $;
datalines;
1 green green
2 blue  blue
;

proc sgpanel data=have &lt;STRONG&gt;dattrmap=attrmap&lt;/STRONG&gt;;
...&lt;/PRE&gt;
&lt;P&gt;Note that most likely you will need to adapt the values of variable &lt;FONT face="courier new,courier"&gt;value&lt;/FONT&gt;&amp;nbsp;above to your data, unless your variable &lt;FONT face="courier new,courier"&gt;trt01p_&lt;/FONT&gt; happens to be numeric with values 1 and 2 (for the groups currently displayed in blue and red, respectively) and not formatted. If&amp;nbsp;&lt;FONT face="courier new,courier"&gt;trt01p_&lt;/FONT&gt;&amp;nbsp;is character with values, say, "Active" and "Placebo" or formatted with these format labels, define &lt;FONT face="courier new,courier"&gt;value&lt;/FONT&gt; as a character variable (of sufficient length) in the DATA step above and replace &lt;FONT face="courier new,courier"&gt;1&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;2&lt;/FONT&gt; by &lt;FONT face="courier new,courier"&gt;Active&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;Placebo&lt;/FONT&gt;, resp., in the data lines.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 11:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPANEL-color-by-subject/m-p/750776#M21698</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-06-28T11:50:22Z</dc:date>
    </item>
  </channel>
</rss>

