<?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: How to display labels for each bar on y axis? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-labels-for-each-bar-on-y-axis/m-p/906789#M358052</link>
    <description>&lt;P&gt;Some options that MAY work depending on your data:&lt;/P&gt;
&lt;P&gt;1) Make the axis discrete with the TYPE=DISCRETE option on the yaxis statement.&lt;/P&gt;
&lt;P&gt;2) FITPOLICY =NONE&amp;nbsp; (may also want Discrete)&lt;/P&gt;
&lt;P&gt;3) Make the graphic area larger using ODS GRAPHICS Height= option prior to the graph. Reset as needed later.&lt;/P&gt;
&lt;P&gt;4) make the Font much smaller, like 5pt or 6pt. The default "units" of size for Text attributes is pixels, which varies from display to display and sometimes. So a test by others with SIZE=11 may "work" because their display uses different resolution than yours. Specifying a unit of size like PT, CM or IN (such as .1in ) may yield better result.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2023 18:26:03 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-12-07T18:26:03Z</dc:date>
    <item>
      <title>How to display labels for each bar on y axis?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-labels-for-each-bar-on-y-axis/m-p/906759#M358033</link>
      <description>&lt;P&gt;I used the below codes to create horizontal bar:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=have;
hbar site/ categoryorder=respdesc datalabelattrs=(Family="Times New Roman" size=11);
xaxis label='Frequency' valueattrs=(Family="Times New Roman" size=11)
												labelattrs=(Family="Times New Roman" size=12);
yaxis label='Site' valueattrs=(Family="Times New Roman" size=11)
												labelattrs=(Family="Times New Roman" size=12);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since there are too many bars, in y axis, it only shows one label every two bars. I tried to reduce the size of font, but it also only displays one label name every two bars. I can't change the range for y axis since it's not number. Does anyone know how to display every bar name on y axis?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 17:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-display-labels-for-each-bar-on-y-axis/m-p/906759#M358033</guid>
      <dc:creator>SAS-questioner</dc:creator>
      <dc:date>2023-12-07T17:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to display labels for each bar on y axis?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-display-labels-for-each-bar-on-y-axis/m-p/906789#M358052</link>
      <description>&lt;P&gt;Some options that MAY work depending on your data:&lt;/P&gt;
&lt;P&gt;1) Make the axis discrete with the TYPE=DISCRETE option on the yaxis statement.&lt;/P&gt;
&lt;P&gt;2) FITPOLICY =NONE&amp;nbsp; (may also want Discrete)&lt;/P&gt;
&lt;P&gt;3) Make the graphic area larger using ODS GRAPHICS Height= option prior to the graph. Reset as needed later.&lt;/P&gt;
&lt;P&gt;4) make the Font much smaller, like 5pt or 6pt. The default "units" of size for Text attributes is pixels, which varies from display to display and sometimes. So a test by others with SIZE=11 may "work" because their display uses different resolution than yours. Specifying a unit of size like PT, CM or IN (such as .1in ) may yield better result.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 18:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-display-labels-for-each-bar-on-y-axis/m-p/906789#M358052</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-12-07T18:26:03Z</dc:date>
    </item>
  </channel>
</rss>

