<?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: PROC SGPLOT - different value colors in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468369#M16121</link>
    <description>Are those hex codes? You need to put a CX before the hex code. Cx000000. &lt;BR /&gt;&lt;BR /&gt;You can use data attribute maps to set colour and style. &lt;A href="http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n18szqcwir8q2nn10od9hhdh2ksj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n18szqcwir8q2nn10od9hhdh2ksj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;</description>
    <pubDate>Thu, 07 Jun 2018 14:13:10 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-06-07T14:13:10Z</dc:date>
    <item>
      <title>PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468360#M16120</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please advise how to assign different colors for datalabels in sgplot hbar chart? With&lt;/P&gt;&lt;P&gt;datalabelattrs =(color=) &amp;nbsp;statement I can put just 1 color for all datalabels together, I need different color for each series (4 bars - "1","2","3" and "4" - I need to assign different color for each bar).&amp;nbsp; THANK YOU!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sgplot&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Americas &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noborder&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; noopaque &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nowall&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;pad&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noautolegend&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;goption&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xpixels&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;400&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ypixels&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;300&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;hbar&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ID / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;response&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=TotalCases &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;stat&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=sum &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalabel&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;group&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=ID &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;dataskin&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=matte&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nooutline&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nostatlabel&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalabelattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;clusterwidth&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0.9&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;barwidth&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0.96&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;styleattrs&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datacolors&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'#D4002C'&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;'#009354'&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;'#EF820F'&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;'#6C206B'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=none &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;valueattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;color&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=black &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;11&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt) &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;LABELATTRS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;color&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=black &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;yaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;values&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=( &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"1"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"2"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"3"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"4"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(NOVALUES NOLINE) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=none &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(noticks) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;' '&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 13:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468360#M16120</guid>
      <dc:creator>bon0</dc:creator>
      <dc:date>2018-06-07T13:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468369#M16121</link>
      <description>Are those hex codes? You need to put a CX before the hex code. Cx000000. &lt;BR /&gt;&lt;BR /&gt;You can use data attribute maps to set colour and style. &lt;A href="http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n18szqcwir8q2nn10od9hhdh2ksj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n18szqcwir8q2nn10od9hhdh2ksj.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;</description>
      <pubDate>Thu, 07 Jun 2018 14:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468369#M16121</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-07T14:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468386#M16124</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;bar colors are working fine. Can you advise please how to set different colors for data labels (response values)?&lt;/P&gt;&lt;P&gt;E.g. - First bar is called "1" and it is red - value is 155 and should be red also. Second bar is called "2" and it is green - value is 255 and should be green ...&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 14:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468386#M16124</guid>
      <dc:creator>bon0</dc:creator>
      <dc:date>2018-06-07T14:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468405#M16129</link>
      <description>&lt;P&gt;Bar labels use the default text color, and are not colored by group.&amp;nbsp; Since the label is right above the bar, it is not clear the benefit of coloring it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do need it colored, you can overlay a TEXT plot with the value and group and place it at the top of your bar.&amp;nbsp; If the bars are not summarized, this will be easy.&amp;nbsp; If they are summarized, then you will need to run PROC MEANS to get the computed values.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468405#M16129</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-06-07T15:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468420#M16130</link>
      <description>&lt;P&gt;Thank you for your answer but unfortunately this will not solve my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reason why I need it colored is because the bar values can vary significantly - e.g. 10 for the first bar and 100k for the second bar. In this case the first one will not be visible because of the measuring scale. Because I am not displaying the axis values (there are about 10 charts in the ppt slide and only 1 legend is displayed for all of them)&amp;nbsp; then it is not obvious what the first bar represents. To use hardcoded position of values will not be good because the bars can reach different values. Also absolute positioning is not possible for ods powerpoint output (as far as I know).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To sum up, is there an answer that this is just simply not possible with SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468420#M16130</guid>
      <dc:creator>bon0</dc:creator>
      <dc:date>2018-06-07T15:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468470#M16135</link>
      <description>&lt;P&gt;How about this approach?&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-inline" image-alt="datalabel.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21097iC5E3A820DA04E955/image-size/large?v=v2&amp;amp;px=999" role="button" title="datalabel.png" alt="datalabel.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.class nway;
class age;
var weight;
output out=class mean=;
run;

proc sgplot data=class;
styleattrs datacolors=(red green blue orange purple cyan) datacontrastcolors=(red green blue orange purple cyan);
vbarparm category=age response=weight / group=age;
xaxistable weight / colorgroup=age location=inside nolabel;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jun 2018 17:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468470#M16135</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-06-07T17:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468639#M16141</link>
      <description>&lt;P&gt;Thank you very much, this solution is sufficient for my needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way how to set a&amp;nbsp;transparent background for the axistable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 10:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/468639#M16141</guid>
      <dc:creator>bon0</dc:creator>
      <dc:date>2018-06-08T10:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT - different value colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/469272#M16160</link>
      <description>&lt;P&gt;Sanjay made a great suggestion to use a TEXT plot for this case, since we are pre-computing the data. See if this works for you:&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-inline" image-alt="datalabel.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21154i98021F9910C45E3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="datalabel.png" alt="datalabel.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.class nway;
class age;
var weight;
output out=class mean=;
run;

proc sgplot data=class;
styleattrs datacolors=(red green blue orange purple cyan) datacontrastcolors=(red green blue orange purple cyan);
vbarparm category=age response=weight / group=age;
text x=age y=weight text=weight / group=age position=top;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jun 2018 14:59:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-different-value-colors/m-p/469272#M16160</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-06-11T14:59:51Z</dc:date>
    </item>
  </channel>
</rss>

