<?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: sgplot barchart with n on y-axis and % floating over the bars in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/738475#M21473</link>
    <description>I'm guessing you didn't set both axis to the same or overwrote your prior YAXIS statement. But with just a single line of code that's an example, post your code, log and the sample output please.</description>
    <pubDate>Mon, 03 May 2021 03:04:23 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-05-03T03:04:23Z</dc:date>
    <item>
      <title>sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730484#M21249</link>
      <description>&lt;P&gt;How do I make a bar chart with N on the y-axis, a category on the x-axis and percent as a label on the bars without creating an output data set with proc freq or something similiar. Just using raw data. . .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 20:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730484#M21249</guid>
      <dc:creator>telligent</dc:creator>
      <dc:date>2021-03-31T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730498#M21251</link>
      <description>&lt;DIV class="xis-argumentDescription"&gt;
&lt;P&gt;&lt;SPAN class="xis-paraSimpleFirst"&gt;The hacky method that comes to mind is overlaying two plots, one with invisible bars that shows the percentages on a non-shown dual axis. So the labels will come from one plot and the data/bars from another. You will need to customize your legend using keylegend - I'm leaving that for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
hbar sex / stat=freq;
hbar sex / stat=percent x2axis datalabel nooutline;
x2axis display=none;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279298"&gt;@telligent&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How do I make a bar chart with N on the y-axis, a category on the x-axis and percent as a label on the bars without creating an output data set with proc freq or something similiar. Just using raw data. . .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you. &amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;FYI - replace HBAR with VBAR and X2AXIS with Y2AXIS for a vertical layout.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 31 Mar 2021 20:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730498#M21251</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-31T20:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730508#M21252</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 21:37:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730508#M21252</guid>
      <dc:creator>telligent</dc:creator>
      <dc:date>2021-03-31T21:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730511#M21253</link>
      <description>Show your code. &lt;BR /&gt;I got those results when I didn't set up the x2/y2 axis correctly.</description>
      <pubDate>Wed, 31 Mar 2021 20:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730511#M21253</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-31T20:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730515#M21254</link>
      <description>&lt;P&gt;proc sgplot data=one noautolegend;&lt;BR /&gt;vbar q1 / stat=freq;&lt;BR /&gt;xaxis display=(nolabel) ; &lt;BR /&gt;vbar q1 /stat=percent x2axis datalabel nooutline;&lt;BR /&gt;x2axis display=none;&lt;BR /&gt;yaxis integer max=&amp;amp;n;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 20:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730515#M21254</guid>
      <dc:creator>telligent</dc:creator>
      <dc:date>2021-03-31T20:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730517#M21255</link>
      <description>You changed HBAR but missed the change of  X2AXIS to the Y2AXIS.&lt;BR /&gt;So that statement doesn't actually make sense.</description>
      <pubDate>Wed, 31 Mar 2021 21:01:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/730517#M21255</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-31T21:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/738426#M21472</link>
      <description>&lt;P&gt;I noticed the statement below that I added throws the whole thing off. When I do this the bar heights are wrong relative to the y axis. Do you have any suggestions for me?&amp;nbsp; I want the y-axis to go up to a certain level and the bar heights to still be correct. Thank you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yaxis integer max=100;&lt;/P&gt;</description>
      <pubDate>Sun, 02 May 2021 20:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/738426#M21472</guid>
      <dc:creator>telligent</dc:creator>
      <dc:date>2021-05-02T20:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot barchart with n on y-axis and % floating over the bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/738475#M21473</link>
      <description>I'm guessing you didn't set both axis to the same or overwrote your prior YAXIS statement. But with just a single line of code that's an example, post your code, log and the sample output please.</description>
      <pubDate>Mon, 03 May 2021 03:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-barchart-with-n-on-y-axis-and-floating-over-the-bars/m-p/738475#M21473</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-03T03:04:23Z</dc:date>
    </item>
  </channel>
</rss>

