<?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 sgplot: plotting different colors and markers for several groups in a scatter plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292502#M10325</link>
    <description>&lt;P&gt;Thanks that worked for the colors, what would I need to add to change the marker style from an open circle, say to a asterisk?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2016 17:36:44 GMT</pubDate>
    <dc:creator>endofline</dc:creator>
    <dc:date>2016-08-18T17:36:44Z</dc:date>
    <item>
      <title>Proc sgplot: plotting different colors and markers for several groups in a scatter plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292326#M10313</link>
      <description>&lt;P&gt;Hi All, I'm running SAS 9.4 and trying to plot a scatter plot with 5 groups, using proc sgplot. I would like my groups on the scatter plot to have different markers than the standard open circle and different colors. I did some hunting online and thought I found a possible solution, however it has not worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%modstyle ( parent=analysis, &lt;BR /&gt; name=mystyle,&lt;BR /&gt; type=CLM,&lt;BR /&gt; colors=green blue yellow orange red,&lt;BR /&gt; markers=circle plus diamond asterisk circlefilled);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods listing style=mystyle;&lt;/P&gt;
&lt;P&gt;proc sgplot data=hospitals; &lt;BR /&gt;scatter x=avg_payment y=score/group=rank; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have any insight in how to change the scatter plot markers &amp;amp; colors? Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 00:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292326#M10313</guid>
      <dc:creator>endofline</dc:creator>
      <dc:date>2016-08-18T00:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot: plotting different colors and markers for several groups in a scatter plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292330#M10314</link>
      <description>&lt;P&gt;Attribute Maps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n18szqcwir8q2nn10od9hhdh2ksj.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#n18szqcwir8q2nn10od9hhdh2ksj.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;A full example is here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2012/02/27/roses-are-red-violets-are-blue/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2012/02/27/roses-are-red-violets-are-blue/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Theres probably newer ever stuff on here if you search with the term attribute map.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 01:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292330#M10314</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-18T01:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot: plotting different colors and markers for several groups in a scatter plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292338#M10315</link>
      <description>&lt;P&gt;Reeza's solution will work, especially if you want specific colors and symbols for specific group values. &amp;nbsp;If you want custom&amp;nbsp;colors and symbols, but don't care which group value gets which one, you can use the STYLEATTRS statement in SGPLOT. &amp;nbsp;Use the DataColors, DataContrastColors, DataSymbols and DataLinePatterns to provide your own list of attributes each. &amp;nbsp;Also, be sure to use ATTRPRIORITY=None to ensure you get color and symbol cycling.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 02:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292338#M10315</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-08-18T02:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot: plotting different colors and markers for several groups in a scatter plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292484#M10322</link>
      <description>&lt;P&gt;Thanks for your response. i tried your suggestion, sadly it didn't work for me. Here is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data myattrmap;&lt;BR /&gt;length linecolor $ 9 fillcolor $ 9;&lt;BR /&gt;input ID $ value $ linecolor $ fillcolor $;&lt;BR /&gt;datalines;&lt;BR /&gt;myid 1 blue blue&lt;BR /&gt;myid 2 yellow yellow&lt;BR /&gt;myid 3 green green&lt;BR /&gt;myid 4 orange orange &lt;BR /&gt;myid 5 red red&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=hospitals &lt;SPAN&gt;dattrmap=myattrmap; &lt;/SPAN&gt;&lt;BR /&gt;scatter x=avg_payment y=score/group=rank &lt;SPAN&gt;attrid=myid;&lt;/SPAN&gt;; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there something that I'm missing. Also, is there a way to also change the marker using this method? Might this be an issue since I'm using enterprise?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 15:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292484#M10322</guid>
      <dc:creator>endofline</dc:creator>
      <dc:date>2016-08-18T15:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot: plotting different colors and markers for several groups in a scatter plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292492#M10324</link>
      <description>&lt;P&gt;Add markercolor to your dataset to change the marker colors.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 16:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292492#M10324</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-08-18T16:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot: plotting different colors and markers for several groups in a scatter plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292502#M10325</link>
      <description>&lt;P&gt;Thanks that worked for the colors, what would I need to add to change the marker style from an open circle, say to a asterisk?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 17:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292502#M10325</guid>
      <dc:creator>endofline</dc:creator>
      <dc:date>2016-08-18T17:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot: plotting different colors and markers for several groups in a scatter plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292503#M10326</link>
      <description>&lt;P&gt;Actually answered my own question. Need to add markersymbol.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatgraph/67882/HTML/default/viewer.htm#n1oq0axfb1tc1yn10kgw6dyuitk2.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatgraph/67882/HTML/default/viewer.htm#n1oq0axfb1tc1yn10kgw6dyuitk2.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 17:42:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgplot-plotting-different-colors-and-markers-for-several/m-p/292503#M10326</guid>
      <dc:creator>endofline</dc:creator>
      <dc:date>2016-08-18T17:42:54Z</dc:date>
    </item>
  </channel>
</rss>

