<?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: attrmap dataset not working in SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/570785#M18402</link>
    <description>&lt;P&gt;Try setting attrpriority=none on the ods graphics statement. Without code we can actually run though it's hard to test anything for you unless someone recognizes the problem right away.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2015/06/28/attributes-priority-for-the-inquiring-mind/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2015/06/28/attributes-priority-for-the-inquiring-mind/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS. I'll also move this to the graphics forum.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2019 01:16:28 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-07-03T01:16:28Z</dc:date>
    <item>
      <title>attrmap dataset not working in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/570784#M18401</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make swimmer plots, as shown in this example:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2014/06/22/swimmer-plot/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2014/06/22/swimmer-plot/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have four treatment groups, all which have the same 8 possible values. My code is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;data attrmap;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;input ID $ value $ 11-21 linecolor $ 24-32 fillcolor $ 34-42;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;datalines;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 Any immuno blue blue&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 Any other charcoal charcoal&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 Chemo orange orange&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 SRS green green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 Targeted purple purple&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 WBRT black black&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 cranio gold gold&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat1 radio pink pink &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 Any immuno blue blue&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 Any other charcoal charcoal&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 Chemo orange orange&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 SRS green green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 Targeted purple purple&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 WBRT black black&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 cranio gold gold&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat2 radio pink pink&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 Any immuno blue blue&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 Any other charcoal charcoal&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 Chemo orange orange&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 SRS green green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 Targeted purple purple&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 WBRT black black&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 cranio gold gold&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat3 radio pink pink&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 Any immuno blue blue&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 Any other charcoal charcoal&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 Chemo orange orange&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 SRS green green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 Targeted purple purple&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 WBRT black black&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 cranio gold gold&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;trtcat4 radio pink pink&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ods graphics on /height=10in;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;footnote J=l h=1 'Each bar represents one subject.';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;proc sgplot data = all_therapy dattrmap=attrmap;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;highlow y=item low=swim_start high=swim_end /type=bar fill nooutline&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;lineattrs=(thickness=2) nomissinggroup transparency=0.5;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;highlow y=item low=swim_start high=time_trt1/type=bar fill &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;lineattrs=(thickness=2) nomissinggroup transparency=0.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;name='t1' group=trtcat1 attrid=trtcat1 legendlabel='Treatment1';&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;highlow y=item low=time_trt1 high=time_trt2/type=bar fill &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;lineattrs=(thickness=2) nomissinggroup transparency=0.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;name='t2' group=trtcat2 attrid=trtcat2 legendlabel='Treatment2';&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;highlow y=item low=time_trt2 high=time_trt3/type=bar fill &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;lineattrs=(thickness=2) nomissinggroup transparency=0.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;name='t3' group=trtcat3 attrid=trtcat3 legendlabel='Treatment3';&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;highlow y=item low=time_trt3 high=time_trt4/type=bar fill &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;lineattrs=(thickness=2) nomissinggroup transparency=0.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;name='t4' group=trtcat4 attrid=trtcat4 legendlabel='Treatment4';&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;xaxis label='Days' values=(0 to 90 by 5) valueshint;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;title 'Patient Treatment Patterns';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;yaxis display=(noticks novalues noline) label='Patients' min=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;keylegend 't1' 't2' 't3' 't4'/ noborder location=inside position=bottomright across=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ods graphics off;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even though the attrmap dataset has the values and colors all in the same order, the colors do not correspond in my plot.&lt;/P&gt;&lt;P&gt;I would like the colors to stay the same across the four trtcat1-trtcat4 groups, and I thought this code would give me that. However, some values have different colors.&lt;/P&gt;&lt;P&gt;For example, cranio is pink in the legend for t1 and light green in legend for t2. It looks like same values stay consistent (Any immuno), but the others are not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas what is causing this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 00:39:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/570784#M18401</guid>
      <dc:creator>soomx</dc:creator>
      <dc:date>2019-07-03T00:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: attrmap dataset not working in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/570785#M18402</link>
      <description>&lt;P&gt;Try setting attrpriority=none on the ods graphics statement. Without code we can actually run though it's hard to test anything for you unless someone recognizes the problem right away.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2015/06/28/attributes-priority-for-the-inquiring-mind/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2015/06/28/attributes-priority-for-the-inquiring-mind/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS. I'll also move this to the graphics forum.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 01:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/570785#M18402</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-03T01:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: attrmap dataset not working in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/570793#M18403</link>
      <description>&lt;P&gt;Thanks for the response. The&amp;nbsp;&lt;SPAN&gt;attrpriority=none statement didn't resolve the issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Not sure what other code is needed?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 02:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/570793#M18403</guid>
      <dc:creator>soomx</dc:creator>
      <dc:date>2019-07-03T02:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: attrmap dataset not working in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/571354#M18414</link>
      <description>&lt;P&gt;If you can post some sample that, that will help us try out various solutions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To be coded like the example you referenced (&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/files/2014/06/Swimmer_93.txt" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/files/2014/06/Swimmer_93.txt&lt;/A&gt;), you'll need to add nocycleattrs to the proc sgplot line&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sgplot data = all_therapy dattrmap=attrmap &lt;STRONG&gt;nocycleattrs&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, make sure that all the values in your 'attrmap' dataset are reading in correctly. I assume the way your code is written that your code &amp;amp; datalines is in the correct columns it's looking for(?), but that when you copy-n-pasted it into the comment above it collapsed the spaces(?) Here's a slightly different version of the code that doesn't depend on the datalines being column-delimited, if you need it:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data attrmap;&lt;BR /&gt;length id $10 value $20 linecolor fillcolor $20;&lt;BR /&gt;infile datalines dlm=',';&lt;BR /&gt;input ID value linecolor fillcolor;&lt;BR /&gt;datalines;&lt;BR /&gt;trtcat1,Any immuno,blue,blue&lt;BR /&gt;trtcat1,Any other,charcoal,charcoal&lt;BR /&gt;trtcat1,Chemo,orange,orange&lt;BR /&gt;trtcat1,SRS,green,green&lt;BR /&gt;trtcat1,Targeted,purple,purple&lt;BR /&gt;trtcat1,WBRT,black,black&lt;BR /&gt;trtcat1,cranio,gold,gold&lt;BR /&gt;trtcat1,radio,pink,pink&lt;BR /&gt;trtcat2,Any immuno,blue,blue&lt;BR /&gt;trtcat2,Any other,charcoal,charcoal&lt;BR /&gt;trtcat2,Chemo,orange,orange&lt;BR /&gt;trtcat2,SRS,green,green&lt;BR /&gt;trtcat2,Targeted,purple,purple&lt;BR /&gt;trtcat2,WBRT,black,black&lt;BR /&gt;trtcat2,cranio,gold,gold&lt;BR /&gt;trtcat2,radio,pink,pink&lt;BR /&gt;trtcat3,Any immuno,blue,blue&lt;BR /&gt;trtcat3,Any other,charcoal,charcoal&lt;BR /&gt;trtcat3,Chemo,orange,orange&lt;BR /&gt;trtcat3,SRS,green,green&lt;BR /&gt;trtcat3,Targeted,purple,purple&lt;BR /&gt;trtcat3,WBRT,black,black&lt;BR /&gt;trtcat3,cranio,gold,gold&lt;BR /&gt;trtcat3,radio,pink,pink&lt;BR /&gt;trtcat4,Any immuno,blue,blue&lt;BR /&gt;trtcat4,Any other,charcoal,charcoal&lt;BR /&gt;trtcat4,Chemo,orange,orange&lt;BR /&gt;trtcat4,SRS,green,green&lt;BR /&gt;trtcat4,Targeted,purple,purple&lt;BR /&gt;trtcat4,WBRT,black,black&lt;BR /&gt;trtcat4,cranio,gold,gold&lt;BR /&gt;trtcat4,radio,pink,pink&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 11:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/attrmap-dataset-not-working-in-SGPLOT/m-p/571354#M18414</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2019-07-05T11:09:12Z</dc:date>
    </item>
  </channel>
</rss>

