<?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: Histogram labels and colors in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602212#M76421</link>
    <description>&lt;P&gt;I can't see your data, but this should get you in the right direction.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Your Title Here';
proc sgpanel data=sashelp.iris noautolegend;
   panelby Species / columns=1;
   histogram SepalLength / fillattrs=(color=green);
   density SepalLength / lineattrs=(color=black);
   colaxis label='Label Here';
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can find all the information you need in the &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=p121sy0a2jycdfn13zygo90opvra.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;PROC SGPANEL Documentation&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2019 20:50:55 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-11-06T20:50:55Z</dc:date>
    <item>
      <title>Histogram labels and colors</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602204#M76418</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have the following code that correctly produced three histograms by group.&lt;/P&gt;&lt;P&gt;However, I would&lt;/P&gt;&lt;P&gt;1) like to change the color of the bars (fill black)&lt;/P&gt;&lt;P&gt;2) change the x axis label from Npo_mean to Hours NPO:.&lt;/P&gt;&lt;P&gt;3) Change and clarify the Y-axis group labels&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The graph output is attached below as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;univariate&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;=tube.survival2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;class&lt;/SPAN&gt; npogroup ;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; Hours;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;/* computes descriptive statisitcs */&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;histogram&lt;/SPAN&gt;&lt;SPAN&gt; Hours&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;/ odstitle=&lt;/SPAN&gt;"Distribution of NPO by Fasting Category"&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;vscale&lt;/SPAN&gt;=percent &lt;SPAN&gt;vaxis&lt;/SPAN&gt;=&lt;SPAN&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; to &lt;SPAN&gt;&lt;STRONG&gt;60&lt;/STRONG&gt;&lt;/SPAN&gt; by &lt;SPAN&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;normal&lt;/SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;nrows&lt;/SPAN&gt;=&lt;SPAN&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;midpoints&lt;/SPAN&gt;=(&lt;SPAN&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; to &lt;SPAN&gt;&lt;STRONG&gt;22&lt;/STRONG&gt;&lt;/SPAN&gt; by &lt;SPAN&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;) ;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;ods&lt;/SPAN&gt; &lt;SPAN&gt;select&lt;/SPAN&gt;&lt;SPAN&gt; histogram; &lt;/SPAN&gt;/* display on the histograms */&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;INSET N&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'Number of patients'&lt;/SPAN&gt; MEDIAN&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;MEAN&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;/&lt;/SPAN&gt;position&lt;SPAN&gt;=ne ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 20:28:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602204#M76418</guid>
      <dc:creator>stancemcgraw</dc:creator>
      <dc:date>2019-11-06T20:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Histogram labels and colors</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602205#M76419</link>
      <description>&lt;P&gt;If the histogram(s) is all you are interested in, I suggest you use PROC SGPLOT/SGPANEL instead. Gives you more control over the visual attributes of the plot.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 20:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602205#M76419</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-06T20:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Histogram labels and colors</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602206#M76420</link>
      <description>&lt;P&gt;Would you know the code to reproduce what I did above for sgplot?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 20:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602206#M76420</guid>
      <dc:creator>stancemcgraw</dc:creator>
      <dc:date>2019-11-06T20:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Histogram labels and colors</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602212#M76421</link>
      <description>&lt;P&gt;I can't see your data, but this should get you in the right direction.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Your Title Here';
proc sgpanel data=sashelp.iris noautolegend;
   panelby Species / columns=1;
   histogram SepalLength / fillattrs=(color=green);
   density SepalLength / lineattrs=(color=black);
   colaxis label='Label Here';
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can find all the information you need in the &lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=p121sy0a2jycdfn13zygo90opvra.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;PROC SGPANEL Documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 20:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Histogram-labels-and-colors/m-p/602212#M76421</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-06T20:50:55Z</dc:date>
    </item>
  </channel>
</rss>

