<?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: Change default colors in SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196288#M7277</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I overlooked that you are not using a GROUP variable. Attrmaps only work when there is a GROUP active. For your example, you just need to use FILLATTRS=(color=&amp;lt;some color&amp;gt;) to control the color of the bars.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Mar 2015 20:00:50 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2015-03-06T20:00:50Z</dc:date>
    <item>
      <title>Change default colors in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196283#M7272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm reading "Statistical graphics procedures by example" by Matange and Heath. I'm trying to modify the colors in the sgplot in the example below, but so far I have been not sucessful. Please see below for an example. I'm trying to change the color of "actual" by individual products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data attrs;&lt;/P&gt;&lt;P&gt;input id $ value $ fillcolor $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;actual A Blue&lt;/P&gt;&lt;P&gt;actual B Black&lt;/P&gt;&lt;P&gt;actual B Green&lt;/P&gt;&lt;P&gt;actual D Yellow&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data = sgbook.product_sales dattrmap=attrs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hbar product /response = actual barwidth=0.5 attrid=id;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hbar product /response=predict barwidth=0.2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code does not work, how would I change the color for individual&lt;IMG alt="SGPlot4.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/9481_SGPlot4.png" width="450" /&gt; products.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 16:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196283#M7272</guid>
      <dc:creator>Forecaster</dc:creator>
      <dc:date>2015-03-06T16:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Change default colors in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196284#M7273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that the ATTRID is incorrect. The ATTRID should be the *value* in the ID column -- not the ID column name itself. The ID column is a reserved column name in an ATTMAP, so it does not need to be referenced. In your case, set attrid=actual, and you should get the correct result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 18:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196284#M7273</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2015-03-06T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Change default colors in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196285#M7274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@DanH, I changed the code following your suggestion, I still do not get the color change, Can you please help &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data attrs;&lt;/P&gt;&lt;P&gt;input id $ value $ fillcolor $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;ACTUAL A Blue&lt;/P&gt;&lt;P&gt;ACTUAL B Black&lt;/P&gt;&lt;P&gt;ACTUAL C Green&lt;/P&gt;&lt;P&gt;ACTUAL D Yellow&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data = sgbook.product_sales dattrmap=attrs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hbar product /response = actual&amp;nbsp; barwidth=0.5 attrid=actual;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hbar product /response=predict barwidth=0.2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 18:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196285#M7274</guid>
      <dc:creator>Forecaster</dc:creator>
      <dc:date>2015-03-06T18:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Change default colors in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196286#M7275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The other issue is case-sensitivity. Sorry I missed that earlier. The ID value on the ATTRID option must match the case of the ID value in the ATTRMAP data set. Incidentally, We have added a couple of new columns to the ATTRMAP data set for SAS 9.4m3. One of those columns gives you the ability to turn off case-sensitivity.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 19:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196286#M7275</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2015-03-06T19:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Change default colors in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196287#M7276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@DanH for some reason, I'm still not getting the right colors. I have changed the codes for easy replicability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running this code on SAS 9.3 (TS1M2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sales;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input product $ actual predict;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;&amp;nbsp; A 10 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; B 12 15&lt;/P&gt;&lt;P&gt;&amp;nbsp; C 15 18&lt;/P&gt;&lt;P&gt;&amp;nbsp; D 13 20&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data attrs;&lt;/P&gt;&lt;P&gt;input id $ value $ fillcolor $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;actual A blue&lt;/P&gt;&lt;P&gt;actual B black&lt;/P&gt;&lt;P&gt;actual C green&lt;/P&gt;&lt;P&gt;actual D yellow&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SGPlot24.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/9482_SGPlot24.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data = sales dattrmap=attrs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hbar product /response = actual&amp;nbsp; barwidth=0.5 attrid=actual;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hbar product /response=predict barwidth=0.2 ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 19:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196287#M7276</guid>
      <dc:creator>Forecaster</dc:creator>
      <dc:date>2015-03-06T19:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Change default colors in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196288#M7277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I overlooked that you are not using a GROUP variable. Attrmaps only work when there is a GROUP active. For your example, you just need to use FILLATTRS=(color=&amp;lt;some color&amp;gt;) to control the color of the bars.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 20:00:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-default-colors-in-SGPLOT/m-p/196288#M7277</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2015-03-06T20:00:50Z</dc:date>
    </item>
  </channel>
</rss>

