<?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: OUTLINE Colors in SGPLOT HISTOGRAM in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/OUTLINE-Colors-in-SGPLOT-HISTOGRAM/m-p/624023#M19442</link>
    <description>&lt;P&gt;From the documentation for the STYLEATTRS statement:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;At least one plot statement must specify the GROUP= option in order for the data attributes to take effect. This requirement applies to the DATACOLORS=, DATACONTRASTCOLORS=, DATALINEPATTERNS=, and DATASYMBOLS= options.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since none of the shown code shows a Group= option then styleattrs statement is not having any affect.&lt;/P&gt;
&lt;P&gt;So one way is to add a group variable that styleattrs can affect:&lt;/P&gt;
&lt;PRE&gt;data have;
call streaminit(1);
do i=1 to 5000;
x=rand("t",3);
xgroup=1;
output;
end;
run;
proc sgplot data=have noautolegend;
styleattrs datacontrastcolors=(orange blue);
HISTOGRAM X/NOFILL group=xgroup;

density x/type=normal(mu=0 sigma=1) lineattrs=(color=red);
xaxis display=(nolabel) values=(-6 to 6 by 1);
yaxis display=(nolabel);
run;
&lt;/PRE&gt;
&lt;P&gt;or go to GTL.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 21:18:46 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-02-11T21:18:46Z</dc:date>
    <item>
      <title>OUTLINE Colors in SGPLOT HISTOGRAM</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/OUTLINE-Colors-in-SGPLOT-HISTOGRAM/m-p/624000#M19441</link>
      <description>&lt;P&gt;I am drawing HISTOGRAMs using SGPLOT. I am seeing the &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n17xrpcduau1f8n1c1nhe477pv18.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;HISTOGRAM&lt;/A&gt; and &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=p1dt33l6a6epk6n1chtynsgsjgit.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;STYLEATTRS&lt;/A&gt; parts in the SAS manual, but couldn't find how to change the OUTLINE colors. This is the minimum sample code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
call streaminit(1);
do i=1 to 5000;
x=rand("t",3);
output;
end;
run;
ods listing gpath="!userprofile\desktop\";
ods graphics/reset;
ods results=off;
proc sgplot noautolegend;

HISTOGRAM X/NOFILL;

density x/type=normal(mu=0 sigma=1) lineattrs=(color=red);
xaxis display=(nolabel) values=(-6 to 6 by 1);
yaxis display=(nolabel);
run;
ods results=on;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The NOFILL option makes the bars white and their outlines black.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPlot.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36044iB838EB6F531A101C/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPlot.png" alt="SGPlot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried to change this black using FILLENDCOLOR and STYLEATTRS DATACONTRASTCOLORS but didn't work. What should I do if I want to make the outline colors of the histogram bars blue?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 20:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/OUTLINE-Colors-in-SGPLOT-HISTOGRAM/m-p/624000#M19441</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2020-02-11T20:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: OUTLINE Colors in SGPLOT HISTOGRAM</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/OUTLINE-Colors-in-SGPLOT-HISTOGRAM/m-p/624023#M19442</link>
      <description>&lt;P&gt;From the documentation for the STYLEATTRS statement:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;At least one plot statement must specify the GROUP= option in order for the data attributes to take effect. This requirement applies to the DATACOLORS=, DATACONTRASTCOLORS=, DATALINEPATTERNS=, and DATASYMBOLS= options.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since none of the shown code shows a Group= option then styleattrs statement is not having any affect.&lt;/P&gt;
&lt;P&gt;So one way is to add a group variable that styleattrs can affect:&lt;/P&gt;
&lt;PRE&gt;data have;
call streaminit(1);
do i=1 to 5000;
x=rand("t",3);
xgroup=1;
output;
end;
run;
proc sgplot data=have noautolegend;
styleattrs datacontrastcolors=(orange blue);
HISTOGRAM X/NOFILL group=xgroup;

density x/type=normal(mu=0 sigma=1) lineattrs=(color=red);
xaxis display=(nolabel) values=(-6 to 6 by 1);
yaxis display=(nolabel);
run;
&lt;/PRE&gt;
&lt;P&gt;or go to GTL.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/OUTLINE-Colors-in-SGPLOT-HISTOGRAM/m-p/624023#M19442</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-02-11T21:18:46Z</dc:date>
    </item>
  </channel>
</rss>

