<?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: Scatter plot with graduated color scheme and multiple symbols in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598677#M19010</link>
    <description>&lt;P&gt;OR this one ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods graphics/ attrpriority=none;
proc sgplot data=sashelp.class;
  styleattrs datasymbols=(circlefilled squarefilled trianglefilled diamondfilled);
  scatter x=weight y=height / colorresponse=age  group=sex
        name="scat"
         colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F);
  gradlegend "scat";
  keylegend "scat" ;
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Oct 2019 12:25:49 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-10-23T12:25:49Z</dc:date>
    <item>
      <title>Scatter plot with graduated color scheme and multiple symbols</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598494#M19005</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica',sans-serif; color: #283138;"&gt;I want to create a plot as written below (scatter plot with graduated color response by a third variable), &lt;U&gt;except&lt;/U&gt; add a fourth group variable identified by the shape of the marker.&lt;BR /&gt;For example, there will be two groups, circles and triangles, each having graduated color scheme all on the same x-y plot.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=mydata;
scatter x=variable1 y=variable2 / colorresponse=variable3
markerattrs=(symbol=CircleFilled)
colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica',sans-serif; color: #283138;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 19:27:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598494#M19005</guid>
      <dc:creator>Vic3</dc:creator>
      <dc:date>2019-10-22T19:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot with graduated color scheme and multiple symbols</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598502#M19006</link>
      <description>&lt;P&gt;Yes, this can be done; but it requires a little slight-of hand &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you have probably found, you cannot use both a GROUP and a COLORRESPONSE in the SCATTER plot (the GROUP is ignored). However, SERIES plots have additional options that give you the ability to control visual attributes with additional class variables. So, to get what you want, do the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Change SCATTER to SERIES&lt;/P&gt;
&lt;P&gt;2. Add the MARKERS option to turn on the markers.&lt;/P&gt;
&lt;P&gt;3. Set LINEATTRS=(thickness=0) /* You don't want to see the lines */&lt;/P&gt;
&lt;P&gt;4. Set GROUP=&amp;lt;your class variable&amp;gt; to get grouping&lt;/P&gt;
&lt;P&gt;5. Set GROUPMS=&amp;lt;the same class variable&amp;gt; to vary only the marker symbol (COLORRESPONSE will control the color)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a simple example adapting your original code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
series x=weight y=height / colorresponse=age  group=sex groupms=sex
markers lineattrs=(thickness=0)
colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F);
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, 22 Oct 2019 19:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598502#M19006</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-10-22T19:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot with graduated color scheme and multiple symbols</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598505#M19007</link>
      <description>&lt;P&gt;Here is a little more complete example, forcing only filled markers, and adding a KEYLEGEND to show your shape values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
  styleattrs datasymbols=(circlefilled squarefilled trianglefilled diamondfilled);
  series x=weight y=height / colorresponse=age  group=sex groupms=sex
         markers lineattrs=(thickness=0) name="scat"
         colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F);
  gradlegend "scat";
  keylegend "scat" / type=markersymbol;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Oct 2019 19:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598505#M19007</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-10-22T19:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot with graduated color scheme and multiple symbols</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598510#M19008</link>
      <description>Thank you very much! This worked perfectly.</description>
      <pubDate>Tue, 22 Oct 2019 19:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598510#M19008</guid>
      <dc:creator>Vic3</dc:creator>
      <dc:date>2019-10-22T19:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot with graduated color scheme and multiple symbols</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598517#M19009</link>
      <description>&lt;P&gt;I labeled your more complicated version as a solution, but the first, simpler code actually provides better visualization in some situations. I'll be using it too. Thank you again!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 20:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598517#M19009</guid>
      <dc:creator>Vic3</dc:creator>
      <dc:date>2019-10-22T20:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot with graduated color scheme and multiple symbols</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598677#M19010</link>
      <description>&lt;P&gt;OR this one ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods graphics/ attrpriority=none;
proc sgplot data=sashelp.class;
  styleattrs datasymbols=(circlefilled squarefilled trianglefilled diamondfilled);
  scatter x=weight y=height / colorresponse=age  group=sex
        name="scat"
         colormodel=(CX3288BD CX99D594 CXE6F598 CXFEE08B CXFC8D59 CXD53E4F);
  gradlegend "scat";
  keylegend "scat" ;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Oct 2019 12:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598677#M19010</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-10-23T12:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter plot with graduated color scheme and multiple symbols</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598708#M19011</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;is correct -- I was overthinking this one. The ATTRPRIORITY option is the key here. If possible, we should adjust the recommended solution to his post.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 13:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Scatter-plot-with-graduated-color-scheme-and-multiple-symbols/m-p/598708#M19011</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-10-23T13:37:22Z</dc:date>
    </item>
  </channel>
</rss>

