<?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: Using style attribute references in SGPLOT SAS 9.4 in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260443#M9404</link>
    <description>&lt;P&gt;I'm just the messenger, but you are welcome. The real thanks are for Sanjay who provided the information and&amp;nbsp;syntax.Like you, I had tried everything I could think of.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think our confusion is that the syntax GraphData1:ContrastColor is valid in the GTL.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2016 15:15:46 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-03-31T15:15:46Z</dc:date>
    <item>
      <title>Using style attribute references in SGPLOT SAS 9.4</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260432#M9400</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have SAS 9.4 TS Level 1M2. I was wondering if it was possible to use style attribute references within SGPLOT to specify the color of your markers? This is because I like to use the default SAS colors, and in my "real" example, I have several columns, so I will use several scatter statements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been using the following code to try and get light red marker symbols, the second color SAS uses in the grouped data, but this doesn't work. I thought it was possible to achieve in SGPLOT in SAS 9.4? I also wanted to avoid using the code of the color, i.e. cx.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data = sashelp.heart;&lt;BR /&gt;&amp;nbsp; scatter x = height y = weight / markerattrs=(symbol=circlefilled color=GraphData2:contrastcolor);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sgplot data = sashelp.heart;&lt;BR /&gt;&amp;nbsp; scatter x = height y = weight / markerattrs=(symbol=circlefilled) filledoutlinedmarkers markerfillattrs=(color=GraphData);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sgplot data = sashelp.heart;&lt;BR /&gt;&amp;nbsp; scatter x = height y = weight / markerattrs=(symbol=circlefilled color=GraphData2);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code, does work in GTL, but I wanted to use SGPLOT for this example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc template;&lt;BR /&gt;&amp;nbsp; define statgraph lineplot;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; begingraph;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; layout overlay;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scatterplot x = height y = weight / markerattrs=(symbol=circlefilled color=GraphData2:contrastcolor);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endgraph;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sgrender data=sashelp.heart template=lineplot;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;P&gt;Kriss&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260432#M9400</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2016-03-31T14:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using style attribute references in SGPLOT SAS 9.4</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260435#M9401</link>
      <description>&lt;P&gt;By a happy coincidence, I asked &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15276"&gt;@SanjayM﻿&lt;/a&gt;&amp;nbsp;this question a few weeks ago and he taught me the trick: You need to specify the GraphData&lt;EM&gt;n &lt;/EM&gt;attributes&lt;EM&gt; &amp;nbsp;&lt;/EM&gt;and then specify the overrides:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data = sashelp.heart;
  scatter x = height y = weight / markerattrs=GraphData2(symbol=circlefilled);
run;

proc sgplot data = sashelp.heart;
  scatter x = height y = weight / markerattrs=(symbol=circlefilled) filledoutlinedmarkers markerfillattrs=GraphData1;
run;

proc sgplot data = sashelp.heart;
  scatter x = height y = weight / markerattrs=GraphData2(symbol=circlefilled);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260435#M9401</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-03-31T14:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using style attribute references in SGPLOT SAS 9.4</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260437#M9403</link>
      <description>&lt;P&gt;Oh thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS﻿&lt;/a&gt;, that's the way to do it! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260437#M9403</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2016-03-31T14:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using style attribute references in SGPLOT SAS 9.4</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260443#M9404</link>
      <description>&lt;P&gt;I'm just the messenger, but you are welcome. The real thanks are for Sanjay who provided the information and&amp;nbsp;syntax.Like you, I had tried everything I could think of.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think our confusion is that the syntax GraphData1:ContrastColor is valid in the GTL.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 15:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-style-attribute-references-in-SGPLOT-SAS-9-4/m-p/260443#M9404</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-03-31T15:15:46Z</dc:date>
    </item>
  </channel>
</rss>

