<?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 Assigning colors to histogram bars in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Assigning-colors-to-histogram-bars/m-p/822791#M324890</link>
    <description>&lt;P&gt;I want to overlay 2 histograms (age in men and women) for 2 groups (rural vs. urban population).&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code below works but the histogram bars are in reversed colors - in 1 figure, women are red, and in the other one, blue. How can I assign the same colors in both figures?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data = data;
histogram AGE / group = SEX;
by URBAN;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="reversed.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73202i9E0F30B536FD3D2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="reversed.PNG" alt="reversed.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 10:06:49 GMT</pubDate>
    <dc:creator>amateur_expert</dc:creator>
    <dc:date>2022-07-12T10:06:49Z</dc:date>
    <item>
      <title>Assigning colors to histogram bars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-colors-to-histogram-bars/m-p/822791#M324890</link>
      <description>&lt;P&gt;I want to overlay 2 histograms (age in men and women) for 2 groups (rural vs. urban population).&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code below works but the histogram bars are in reversed colors - in 1 figure, women are red, and in the other one, blue. How can I assign the same colors in both figures?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data = data;
histogram AGE / group = SEX;
by URBAN;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="reversed.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73202i9E0F30B536FD3D2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="reversed.PNG" alt="reversed.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 10:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-colors-to-histogram-bars/m-p/822791#M324890</guid>
      <dc:creator>amateur_expert</dc:creator>
      <dc:date>2022-07-12T10:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning colors to histogram bars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assigning-colors-to-histogram-bars/m-p/822805#M324895</link>
      <description>&lt;P&gt;Try sorting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=data;
    by urban sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assigning-colors-to-histogram-bars/m-p/822805#M324895</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-07-12T11:56:55Z</dc:date>
    </item>
  </channel>
</rss>

