<?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: SGPLOT line and markers type, thickness, color in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/911612#M24289</link>
    <description>&lt;P&gt;hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am plotting regressions in SGPANEL:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgpanel data=dataset ;&lt;BR /&gt;panelby type ;&lt;BR /&gt;reg x=IV y=DV /group=group ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variable group has four levels (A B C D), and thus i get four separate regression lines.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to control the the color (red, orange, yellow, green), line type (solid, dot, dash,&amp;nbsp;&lt;SPAN&gt;longdash&lt;/SPAN&gt;) and line thickness as well as the type of markers for the observed values and their color (matching the colors of the corresponding line, of course).&lt;/P&gt;&lt;P&gt;I am having a really hard time making that work.&lt;/P&gt;&lt;P&gt;If you have any suggestion, I'd very much appreciate.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally a solution that would work also with SGPANEL.&lt;/P&gt;&lt;P&gt;I used SAS Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eman&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2024 07:44:40 GMT</pubDate>
    <dc:creator>emaneman</dc:creator>
    <dc:date>2024-01-16T07:44:40Z</dc:date>
    <item>
      <title>SGPLOT line type and thickness</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/911611#M24288</link>
      <description />
      <pubDate>Tue, 16 Jan 2024 07:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/911611#M24288</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2024-01-16T07:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT line and markers type, thickness, color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/911612#M24289</link>
      <description>&lt;P&gt;hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am plotting regressions in SGPANEL:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgpanel data=dataset ;&lt;BR /&gt;panelby type ;&lt;BR /&gt;reg x=IV y=DV /group=group ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The variable group has four levels (A B C D), and thus i get four separate regression lines.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to control the the color (red, orange, yellow, green), line type (solid, dot, dash,&amp;nbsp;&lt;SPAN&gt;longdash&lt;/SPAN&gt;) and line thickness as well as the type of markers for the observed values and their color (matching the colors of the corresponding line, of course).&lt;/P&gt;&lt;P&gt;I am having a really hard time making that work.&lt;/P&gt;&lt;P&gt;If you have any suggestion, I'd very much appreciate.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally a solution that would work also with SGPANEL.&lt;/P&gt;&lt;P&gt;I used SAS Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eman&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 07:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/911612#M24289</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2024-01-16T07:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT line and markers type, thickness, color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/911622#M24290</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
call streaminit(123);
do type='A','B','C','D';
  do group='A','B','C','D';
    do obs=1 to 20;
      x=rand('normal');
	  y=rand('normal');
      output;
	end;
  end;
end;
run;

data dattrmap;
id='id';
input value $ linecolor $ LINEPATTERN $ LINETHICKNESS   MARKERCOLOR $ MARKERSYMBOL :$20.;
cards;
A red  solid  4  red circlefilled
B orange  dot 6  orange triangleFilled
C yellow  dash 8 yellow starfilled
D green   longdash 10  green  DiamondFilled
;

proc sgpanel data=have dattrmap=dattrmap;
panelby type/novarname ;
reg x=x y=y /group=group markerattrs=(size=12) attrid=id; 
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-1705393256927.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92553i7BA31CA2FAC33781/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1705393256927.png" alt="Ksharp_0-1705393256927.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 08:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/911622#M24290</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-01-16T08:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT line and markers type, thickness, color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/912181#M24291</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;thanks for the reply, and sorry for the late response on my end.&lt;/P&gt;&lt;P&gt;I wanted to have only one group/regression line in each quadrant, so I adjusted the syntax, and it works well!&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Emanuele&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 15:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-line-type-and-thickness/m-p/912181#M24291</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2024-01-19T15:11:00Z</dc:date>
    </item>
  </channel>
</rss>

