<?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: Attribute maps not working right for markersymbols in sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452501#M15523</link>
    <description>&lt;P&gt;Also, be sure to use attrpriority=none when you want different markers (particularly when using an attrpriority=color style like htmlblue).&lt;/P&gt;</description>
    <pubDate>Mon, 09 Apr 2018 14:31:34 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2018-04-09T14:31:34Z</dc:date>
    <item>
      <title>Attribute maps not working right for markersymbols in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452416#M15517</link>
      <description>&lt;P&gt;I have a challenge in getting attribute maps to relate to markers symbols.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the following graph I want different symbols for the group variables&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FactorpltPNG.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19691iADF7B59608327CFB/image-size/large?v=v2&amp;amp;px=999" role="button" title="FactorpltPNG.PNG" alt="FactorpltPNG.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have an attribute set that contain the group as value, ID and Markercolor, linecolor and Marker symbol.&lt;/P&gt;&lt;P&gt;I've been using this blog as an example&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2012/02/27/roses-are-red-violets-are-blue/" target="_blank"&gt;https://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;However I do not get the markersymbol to work in the program below. If anybody can spot my mistake or another reason why this does not work I would be gratefull. I need to use an attribute map as I want the colors and symbols to be consitent with different subset of the lithography. There are no warnings in the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.PLOT;
  infile datalines dsd truncover;
  input New_name:$28. Factor2:32. Factor1:32. Variable:$5.;
datalines4;
CLAYSTONE,-0.185413784,0.8765300403,DEN
CLAYSTONE,0.0802383641,-0.942423341,DT
CLAYSTONE,0.0894057721,-0.914880023,DTS
CLAYSTONE,-0.136821684,0.8858383038,MD
CLAYSTONE,0.499795716,0.5467842298,rdep2
CLAYSTONE,0.8796590392,0.1908197143,RMED
SANDSTONE,-0.073826801,-0.810730681,DEN
SANDSTONE,0.0054279929,0.9557568336,DT
SANDSTONE,-0.008915198,0.9355992025,DTS
SANDSTONE,0.0206300191,-0.860819962,MD
SANDSTONE,0.7554762984,-0.022696386,rdep2
SANDSTONE,0.7646326321,-0.028504051,RMED
SANDY CLAYSTONE,-0.534628033,0.5768449572,DEN
SANDY CLAYSTONE,0.106994111,-0.886402929,DT
SANDY CLAYSTONE,0.3631873579,-0.808710324,DTS
SANDY CLAYSTONE,-0.908688287,0.1857373082,MD
SANDY CLAYSTONE,0.5436369576,0.7820378251,rdep2
SANDY CLAYSTONE,0.5483943704,0.8034061258,RMED
SILTY SANDSTONE,-0.053856972,0.8735052089,DEN
SILTY SANDSTONE,0.0412853994,-0.968138473,DT
SILTY SANDSTONE,0.0332220091,-0.956833223,DTS
SILTY SANDSTONE,-0.040747162,0.9220015982,MD
SILTY SANDSTONE,0.9423890513,0.0879985013,rdep2
SILTY SANDSTONE,0.9433741015,0.0778507436,RMED
;;;;

data LITH_ATTRIBUTES;
  infile datalines dsd truncover;
  input ID:$4. value:$28. Markercolor:$18. Linecolor:$18. Markersymbol:$25.;
datalines4;
lith,ANHYDRITE,BRPK,BRPK,Triangle
lith,CLAYSTONE,aquamarine,aquamarine,Diamondfilled
lith,COAL,DABGR,DABGR,Plus
lith,CONGLOMERATE,DarkGreen,DarkGreen,TriangleDownfilled
lith,CONGLOMERATE MUDDY SANDSTONE,DarkGreen,DarkGreen,CircleFilled
lith,DOLOMITIC LIMESTONE,BIO,BIO,HomeDownFilled
lith,HALITE,Beige,Beige,SquareFilled
lith,INTRUSIVE ROCK,VIV,VIV,TriangleLeftFilled
lith,LIMESTONE,BIPB,BIPB,TriangleFilled
lith,MARL,deepskyblue,deepskyblue,CircleFilled
lith,METAMORPHIC ROCKS,BIP,BIP,TriangleRightFilled
lith,MUDDY SANDSTONE,Brown,Brown,TriangleLeft
lith,SANDSTONE,chocolate,chocolate,CircleFilled
lith,SANDY CLAYSTONE,burlywood,burlywood,TriangleDownFilled
lith,SHALE,Olive,Olive,SquareFilled
lith,SILTSTONE,BRO,BRO,DiamondFilled
lith,SILTY CLAYSTONE,gold,gold,Starfilled
lith,SILTY SANDSTONE,BIGB,BIGB,Hash
lith,SILTY SHALE,blanchedalmond,blanchedalmond,Star
lith,UNKNOWN,salmon,salmon,TriangleRight
lith,VOLCANIC CLASTICS,crimson,crimson,IBeam
;;;;


ods graphics on / imagemap;
proc sgplot data=plot aspect=1 dattrmap=Lith_attributes;
	scatter x=Factor1 y=Factor2/ group=New_name markerattrs=(symbol=circlefilled size=10 px) datalabel=variable attrid=lith;
	refline 0 / axis=x;
	refline 0 / axis=y;
	xaxis min=-1 max=1;
	yaxis min=-1 max=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Apr 2018 06:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452416#M15517</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2018-04-09T06:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute maps not working right for markersymbols in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452499#M15522</link>
      <description>Hi:&lt;BR /&gt;  Why do you have symbol=circlefilled in your SCATTER statement? I suggest you just keep size=10px in your SCATTER statement for MARKERATTRS and allow the attribute map to be in control.&lt;BR /&gt; &lt;BR /&gt;Cynthia</description>
      <pubDate>Mon, 09 Apr 2018 14:26:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452499#M15522</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-04-09T14:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute maps not working right for markersymbols in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452501#M15523</link>
      <description>&lt;P&gt;Also, be sure to use attrpriority=none when you want different markers (particularly when using an attrpriority=color style like htmlblue).&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 14:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452501#M15523</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-04-09T14:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute maps not working right for markersymbols in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452502#M15524</link>
      <description>&lt;P&gt;Thanks a million. Three poeple here have looked at this and not seen the symbol=circlefilled. Removing and everything worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason it was there was form the first version before we decided we needed more symbols.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 14:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452502#M15524</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2018-04-09T14:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute maps not working right for markersymbols in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452503#M15525</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 14:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452503#M15525</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2018-04-09T14:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute maps not working right for markersymbols in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452505#M15526</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40011"&gt;@PaalNavestad&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thanks a million. Three poeple here have looked at this and not seen the symbol=circlefilled. Removing and everything worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason it was there was form the first version before we decided we needed more symbols.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I find it easier to debug graphic problems when one option is on one line such as:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=plot aspect=1 dattrmap=Lith_attributes;
	scatter x=Factor1 y=Factor2/ 
            group=New_name 
            markerattrs=(symbol=circlefilled size=10 px) 
            datalabel=variable 
            attrid=lith
   ;
	refline 0 / axis=x;
	refline 0 / axis=y;
	xaxis min=-1 max=1;
	yaxis min=-1 max=1;
run;&lt;/PRE&gt;
&lt;P&gt;Long lines of code may tend to obfuscate an option that doesn't appear in a "normal" length statement. Since there may be many graphic options on a single plot statement this is a tad easier to read. Also commenting out one option is easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 14:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452505#M15526</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-09T14:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute maps not working right for markersymbols in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452628#M15528</link>
      <description>&lt;P&gt;Thanks ballardw. You are completly right. Just old bad habits I think in adding all in one line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 19:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Attribute-maps-not-working-right-for-markersymbols-in-sgplot/m-p/452628#M15528</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2018-04-09T19:31:14Z</dc:date>
    </item>
  </channel>
</rss>

