<?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 specify plot markers for proc sgplot with attribute map? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364783#M86547</link>
    <description>&lt;P&gt;I'm trying to implement the solution given in the forum post&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Proc-sgplot-plotting-different-colors-and-markers-for-several/td-p/292326" target="_blank"&gt;Proc sgplot: plotting different colors and markers for several groups in a scatter plot&lt;/A&gt;,&amp;nbsp;&lt;SPAN&gt;but my plot markers are not changing with group. &amp;nbsp;&lt;/SPAN&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;* Create attribute map;
data plotattrs;
	retain id "myid";
	length value 3.0 markercolor $ 6 markersymbol $ 6;
	input value markercolor $ markersymbol $;
	datalines;
		1 red plus
		2 green x
	;
run;

* Plot data;
proc sgplot
		data = sashelp.iris
		dattrmap = plotattrs;
	scatter x = petallength y = petalwidth /
		group = species
  		attrid = myid;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The plot that is generated&amp;nbsp;represents group by color, but not by marker type:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9249i139E8B5392B40A0E/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="sasPlot.png" title="sasPlot.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I make&amp;nbsp;the plot marker type vary with group like the marker color does?&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2017 22:31:07 GMT</pubDate>
    <dc:creator>user42</dc:creator>
    <dc:date>2017-06-06T22:31:07Z</dc:date>
    <item>
      <title>How to specify plot markers for proc sgplot with attribute map?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364783#M86547</link>
      <description>&lt;P&gt;I'm trying to implement the solution given in the forum post&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Proc-sgplot-plotting-different-colors-and-markers-for-several/td-p/292326" target="_blank"&gt;Proc sgplot: plotting different colors and markers for several groups in a scatter plot&lt;/A&gt;,&amp;nbsp;&lt;SPAN&gt;but my plot markers are not changing with group. &amp;nbsp;&lt;/SPAN&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;* Create attribute map;
data plotattrs;
	retain id "myid";
	length value 3.0 markercolor $ 6 markersymbol $ 6;
	input value markercolor $ markersymbol $;
	datalines;
		1 red plus
		2 green x
	;
run;

* Plot data;
proc sgplot
		data = sashelp.iris
		dattrmap = plotattrs;
	scatter x = petallength y = petalwidth /
		group = species
  		attrid = myid;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The plot that is generated&amp;nbsp;represents group by color, but not by marker type:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9249i139E8B5392B40A0E/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="sasPlot.png" title="sasPlot.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I make&amp;nbsp;the plot marker type vary with group like the marker color does?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 22:31:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364783#M86547</guid>
      <dc:creator>user42</dc:creator>
      <dc:date>2017-06-06T22:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify plot markers for proc sgplot with attribute map?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364792#M86552</link>
      <description>&lt;P&gt;The value has to match the value of the group variable.&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;data plotattrs;
	retain id "myid";
	length value $ 10 markercolor $ 6 markersymbol $ 6;
	input value markercolor $ markersymbol $;
	datalines;
		Setosa red plus
		Versicolor2 green x
      Virginica blue  diamond
	;
run;

* Plot data;
proc sgplot
		data = sashelp.iris
		dattrmap = plotattrs;
	scatter x = petallength y = petalwidth /
		group = species
  		attrid = myid;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Jun 2017 23:03:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364792#M86552</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-06T23:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify plot markers for proc sgplot with attribute map?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364793#M86553</link>
      <description>&lt;P&gt;Thank you-- I knew I was missing something basic.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 23:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364793#M86553</guid>
      <dc:creator>user42</dc:creator>
      <dc:date>2017-06-06T23:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify plot markers for proc sgplot with attribute map?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364795#M86555</link>
      <description>&lt;P&gt;You may also want to consider using longer text fields by default for you options just so you don't do what I did and tryto stuff "diamond" into a 6 character field.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 23:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364795#M86555</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-06T23:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify plot markers for proc sgplot with attribute map?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364796#M86556</link>
      <description>Yeah, I actually caught that one. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 06 Jun 2017 23:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364796#M86556</guid>
      <dc:creator>user42</dc:creator>
      <dc:date>2017-06-06T23:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify plot markers for proc sgplot with attribute map?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364968#M86633</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / attrpriority=none;
proc sgplot	data = sashelp.iris;
 styleattrs datacolors=(red yellow blue) ;
	scatter x = petallength y = petalwidth /
	jitter	group = species;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jun 2017 13:19:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/364968#M86633</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-06-07T13:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify plot markers for proc sgplot with attribute map?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/365021#M86649</link>
      <description>&lt;P&gt;Thanks for this, Ksharp. I wasn't aware of the "styleattrs" statement in proc sgplot.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 14:47:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-specify-plot-markers-for-proc-sgplot-with-attribute-map/m-p/365021#M86649</guid>
      <dc:creator>user42</dc:creator>
      <dc:date>2017-06-07T14:47:14Z</dc:date>
    </item>
  </channel>
</rss>

