<?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: Define color markers in proc sgscatter by groups in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Define-color-markers-in-proc-sgscatter-by-groups/m-p/307137#M10786</link>
    <description>Thank you! Both solutions work fine</description>
    <pubDate>Tue, 25 Oct 2016 14:23:01 GMT</pubDate>
    <dc:creator>andrealivraghi</dc:creator>
    <dc:date>2016-10-25T14:23:01Z</dc:date>
    <item>
      <title>Define color markers in proc sgscatter by groups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Define-color-markers-in-proc-sgscatter-by-groups/m-p/307086#M10776</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro scatter (x,y, xlabel, ylabel, pearson, pval);

ods html gpath = '...';
ods graphics / reset = all width = 12in height = 6in border = off
imagename = "Scatter_&amp;amp;x-&amp;amp;y" imagefmt = png ;

proc sgscatter data = data_2015;
plot &amp;amp;x*&amp;amp;y /  filledoutlinedmarkers group = type 

markerfillattrs = (color = CX62C0FF) 
markeroutlineattrs = (color = CX265C7F  thickness = 1)
markerattrs = (symbol = circlefilled size = 15 )&lt;BR /&gt;&lt;BR /&gt;/* Here i want to include two more colors */
;

title "Pearson = &amp;amp;pearson   P-Value = &amp;amp;pval";

label &amp;amp;x = "&amp;amp;xlabel" &amp;amp;y = "&amp;amp;ylabel";

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to specify 3 different markers colors in a gscatter procedure according to a categorical variable "type" (assuming 3 values) specified in the group option. How can I use the filledoutlinedmarkers option for grouped variables in the same scatterplot?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 10:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Define-color-markers-in-proc-sgscatter-by-groups/m-p/307086#M10776</guid>
      <dc:creator>andrealivraghi</dc:creator>
      <dc:date>2016-10-25T10:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Define color markers in proc sgscatter by groups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Define-color-markers-in-proc-sgscatter-by-groups/m-p/307133#M10785</link>
      <description>&lt;P&gt;There are two way to do this. One way is to just override the style colors using the DATACOLORS and DATACONTRASTCOLORS option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgscatter data=sashelp.class datacolors=(lightblue pink) datacontrastcolors=(blue maroon);
plot weight*height / group=sex filledoutlinedmarkers
markerattrs=(symbol=circlefilled size=10);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can also use a discrete attributes map to associate the colors to the correct group values so that you are not dependent on data order:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data markermap;
retain id "myid";
length fillcolor $ 9 markercolor $ 6;
input value $ fillcolor $ markercolor $;
cards;
F pink      maroon
M lightblue blue
;
run;

proc sgscatter data=sashelp.class dattrmap=markermap;
plot weight*height / group=sex attrid=myid filledoutlinedmarkers
markerattrs=(symbol=circlefilled);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 14:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Define-color-markers-in-proc-sgscatter-by-groups/m-p/307133#M10785</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-10-25T14:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Define color markers in proc sgscatter by groups</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Define-color-markers-in-proc-sgscatter-by-groups/m-p/307137#M10786</link>
      <description>Thank you! Both solutions work fine</description>
      <pubDate>Tue, 25 Oct 2016 14:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Define-color-markers-in-proc-sgscatter-by-groups/m-p/307137#M10786</guid>
      <dc:creator>andrealivraghi</dc:creator>
      <dc:date>2016-10-25T14:23:01Z</dc:date>
    </item>
  </channel>
</rss>

