<?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: SGPLOT VBOX Change Category Color in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608425#M19166</link>
    <description>&lt;P&gt;Hi and welcome to the SAS Community &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Are you able to share the&amp;nbsp;&lt;SPAN&gt;Variables&amp;nbsp;data?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;One thing you should correct at least is that you define your &lt;A href="https://sasnrd.com/sas-discrete-attribute-map/" target="_self"&gt;attribute map&lt;/A&gt; in the&amp;nbsp;&lt;EM&gt;resultat&amp;nbsp;&lt;/EM&gt;library. But you reference an attribute map in the work library in your PROC SGPLOT Statement. You should put&amp;nbsp;dattrmap=resultat.attrmapfreq there instead&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Nov 2020 10:33:13 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2020-11-07T10:33:13Z</dc:date>
    <item>
      <title>SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608403#M19165</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm using SAS. I'm creating box plots with 5 categories and I would like to choose a different, customized color for each category.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is my code :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data resultat.attrmapfreq;&lt;BR /&gt;retain id " freq" ;&lt;BR /&gt;input value $ fillcolor $;&lt;BR /&gt;datalines;&lt;BR /&gt;05 blue&lt;/P&gt;&lt;P&gt;01 red&lt;BR /&gt;02 magenta&lt;BR /&gt;03 maroon&lt;BR /&gt;04 olive&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sgplot data=resultat.Variables dattrmap=attrmapfreq ;&lt;BR /&gt;vbox MoyNotes / category=Freqrecherche group=Freqrecherche attrid=freq ;&lt;BR /&gt;format Freqrecherche Freqrecherche.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already have random colors. Freqrecherche is numeric but how can i do ? Even if i create a new char variable it doesn't work. I do a format on Freqrecherche but can i use it and how ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please it's little bit important&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 02:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608403#M19165</guid>
      <dc:creator>dorian26</dc:creator>
      <dc:date>2019-11-30T02:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608425#M19166</link>
      <description>&lt;P&gt;Hi and welcome to the SAS Community &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Are you able to share the&amp;nbsp;&lt;SPAN&gt;Variables&amp;nbsp;data?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;One thing you should correct at least is that you define your &lt;A href="https://sasnrd.com/sas-discrete-attribute-map/" target="_self"&gt;attribute map&lt;/A&gt; in the&amp;nbsp;&lt;EM&gt;resultat&amp;nbsp;&lt;/EM&gt;library. But you reference an attribute map in the work library in your PROC SGPLOT Statement. You should put&amp;nbsp;dattrmap=resultat.attrmapfreq there instead&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 10:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608425#M19166</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-11-07T10:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608427#M19167</link>
      <description>&lt;P&gt;See if you can use this as a template&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data MyAttrMap;
length id $4 value FillColor $10;
input id value FillColor;
datalines;
MyID 13 Green
MyID 14 Gold
MyID 15 Red
;

proc sgplot data=sashelp.class dattrmap=MyAttrMap;
   where age in (13, 14, 15);
   vbox height / category=age group=age attrid=MyID;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="vbox.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34338i2A2A645AED09B8C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="vbox.png" alt="vbox.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 10:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608427#M19167</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-30T10:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608442#M19168</link>
      <description>&lt;P&gt;I tried like that :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data resultat.attrmapfreq;&lt;BR /&gt;length id $4 value Fillcolor $10;&lt;BR /&gt;input id value fillcolor ;&lt;BR /&gt;datalines;&lt;BR /&gt;freq 05 blue&lt;BR /&gt;freq 01 red&lt;BR /&gt;freq 02 magenta&lt;BR /&gt;freq 03 maroon&lt;BR /&gt;freq 04 olive&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sgplot data=resultat.Variables dattrmap=resultat.attrmapfreq ;&lt;BR /&gt;where Freqrecherche in (01, 02, 03, 04, 05);&lt;BR /&gt;vbox MoyNotes / category=Freqrecherche group=Freqrecherche attrid=freq ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it doesn't work. And there is an error " invlid attrid freq specified ". It's like there is no relation between my map and my plot&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 14:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608442#M19168</guid>
      <dc:creator>dorian26</dc:creator>
      <dc:date>2019-11-30T14:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608446#M19169</link>
      <description>&lt;P&gt;ok it's working. Now i want to apply my format on freqrecherche and when i do it, there is a probleme&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 15:06:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608446#M19169</guid>
      <dc:creator>dorian26</dc:creator>
      <dc:date>2019-11-30T15:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608447#M19170</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you explain what the problem is at the point in more detail? It is helpful to see code, log messages, etc. It’s confusing that you say “it’s working now” and also “there is a problem”&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;without seeing anything my guess is that the variable you want to apply this to is a character values but I can’t be sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-unison&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 15:25:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608447#M19170</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-11-30T15:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608448#M19171</link>
      <description />
      <pubDate>Sat, 30 Nov 2019 15:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608448#M19171</guid>
      <dc:creator>dorian26</dc:creator>
      <dc:date>2019-11-30T15:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBOX Change Category Color</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608612#M19172</link>
      <description>&lt;P&gt;The values in the VALUE column of the attrmap must be the formatted values. So, when you added your format, the values probably did not match up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 01:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBOX-Change-Category-Color/m-p/608612#M19172</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-12-02T01:42:21Z</dc:date>
    </item>
  </channel>
</rss>

