<?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: Conditional bar colors for Histogram in PROC UNIVARIATE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Conditional-bar-colors-for-Histogram-in-PROC-UNIVARIATE/m-p/699966#M214153</link>
    <description>&lt;P&gt;Here is the code I am using, in case this requires another procedure.&amp;nbsp; I need the bins to be based on endpoints, and by 1.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc univariate data=DATA  ;
var values;
histogram values/endpoints=(0 to 25 by 1) vscale=count vaxis=(0 to 500 by 100) odstitle="my histogram"
vaxislabel="Count" href=(1 10 25) ;
where values &amp;lt; 25;
run;
ods graphics off;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 19:22:49 GMT</pubDate>
    <dc:creator>RandoDando</dc:creator>
    <dc:date>2020-11-18T19:22:49Z</dc:date>
    <item>
      <title>Conditional bar colors for Histogram in PROC UNIVARIATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditional-bar-colors-for-Histogram-in-PROC-UNIVARIATE/m-p/699932#M214134</link>
      <description>&lt;P&gt;Is there a way to specify a fill color for the bars in the histogram in the UNIVARIATE procedure conditionally?&amp;nbsp; For instance, if the value of the variable is &amp;lt; 5 then Red, &amp;gt;5 and &amp;lt; 15 then Yellow, etc.. ?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditional-bar-colors-for-Histogram-in-PROC-UNIVARIATE/m-p/699932#M214134</guid>
      <dc:creator>RandoDando</dc:creator>
      <dc:date>2020-11-18T18:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional bar colors for Histogram in PROC UNIVARIATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditional-bar-colors-for-Histogram-in-PROC-UNIVARIATE/m-p/699963#M214152</link>
      <description>&lt;P&gt;No, but you can overlay the categories in the background by using a block plot. Two methods are shown in the article &lt;A href="https://blogs.sas.com/content/iml/2015/12/09/categories-histogram-block-plot.html" target="_self"&gt;"Overlay categories on a histogram."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really want the bars themselves colored, you can use a bar chart and make a few modifications so it looks like a histogram. Details at &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2015/11/30/7180/" target="_self"&gt;"Histogram with Gradient Color."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 19:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditional-bar-colors-for-Histogram-in-PROC-UNIVARIATE/m-p/699963#M214152</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-11-18T19:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional bar colors for Histogram in PROC UNIVARIATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditional-bar-colors-for-Histogram-in-PROC-UNIVARIATE/m-p/699966#M214153</link>
      <description>&lt;P&gt;Here is the code I am using, in case this requires another procedure.&amp;nbsp; I need the bins to be based on endpoints, and by 1.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc univariate data=DATA  ;
var values;
histogram values/endpoints=(0 to 25 by 1) vscale=count vaxis=(0 to 500 by 100) odstitle="my histogram"
vaxislabel="Count" href=(1 10 25) ;
where values &amp;lt; 25;
run;
ods graphics off;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 19:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditional-bar-colors-for-Histogram-in-PROC-UNIVARIATE/m-p/699966#M214153</guid>
      <dc:creator>RandoDando</dc:creator>
      <dc:date>2020-11-18T19:22:49Z</dc:date>
    </item>
  </channel>
</rss>

