<?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: horizontal bar chart using sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438906#M15142</link>
    <description>&lt;P&gt;let me just post the sas code here incase someone can help. I will be very gratefull for any help. Thanks&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sg.test2 noborder nowall;
yaxis grid type=discrete discreteorder=data; 
hbar types /response=total barwidth=0.5 missing datalabel fillattrs=(color=gray);
yaxis display=(nolabel noline noticks); 
xaxis display=(nolabel noline novalues noticks) max=3000 reverse;
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and here is the input data&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 11:22:18 GMT</pubDate>
    <dc:creator>Anita_n</dc:creator>
    <dc:date>2018-02-21T11:22:18Z</dc:date>
    <item>
      <title>horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438642#M15119</link>
      <description>&lt;P&gt;I plotted a horizontal Barchart using sgplot. All works fine, the only problem I have, is that&amp;nbsp; I wish to rotate the whole graph so that the&amp;nbsp;&lt;/P&gt;&lt;P&gt;yaxis which is now on the left hand side, is turned to the right hand side. Also is there anyway to get rid of the vertical line on the yaxis? can anyone help?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="export.jpg" style="width: 283px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18695i36A77158265749C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="export.jpg" alt="export.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 14:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438642#M15119</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-02-20T14:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438644#M15120</link>
      <description>&lt;P&gt;You can set the display on yaxis to none:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n0n6uml63c6h8dn16phbd1arm9g9.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n0n6uml63c6h8dn16phbd1arm9g9.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;See display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can setup the y2axis as you want to display it:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n04drrb1aehuqzn1t12j3958krtw.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n04drrb1aehuqzn1t12j3958krtw.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will find this blog helpful as it has thousands of examples of all types of graphs:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 14:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438644#M15120</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-20T14:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438658#M15122</link>
      <description>&lt;P&gt;And, if you also want the bars to go from right to left, then you can use the REVERSE option on the XAXIS.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 14:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438658#M15122</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-02-20T14:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438876#M15141</link>
      <description>&lt;P&gt;Thanks for your quick responses. I tried both methods but haven't still got it working. when I use reverse on the xaxis I get something like this:&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="dok1.jpg" style="width: 192px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18729iCD921C6E30E3398D/image-dimensions/192x271?v=v2" width="192" height="271" role="button" title="dok1.jpg" alt="dok1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;How do I get the labels on the left handside? Also I wish to get rid of the line holding the bars. Is there any way to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 07:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438876#M15141</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-02-21T07:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438906#M15142</link>
      <description>&lt;P&gt;let me just post the sas code here incase someone can help. I will be very gratefull for any help. Thanks&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sg.test2 noborder nowall;
yaxis grid type=discrete discreteorder=data; 
hbar types /response=total barwidth=0.5 missing datalabel fillattrs=(color=gray);
yaxis display=(nolabel noline noticks); 
xaxis display=(nolabel noline novalues noticks) max=3000 reverse;
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and here is the input data&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 11:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438906#M15142</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-02-21T11:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438920#M15143</link>
      <description>&lt;P&gt;Use Y2AXIS as suggested by RW9 (see bold options in code below).&amp;nbsp; Also, you can remove the baseline by setting BASELINEATTRS=(thickness=0) on the HBAR.&amp;nbsp; I would put the grid on the xaxis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;proc sgplot data=sg.test2 noborder nowall; 
hbar types / response=total barwidth=0.5 &lt;STRONG&gt;y2axis&lt;/STRONG&gt; missing datalabel fillattrs=(color=gray)
     &lt;STRONG&gt;baselineattrs=(thickness=0)&lt;/STRONG&gt;;
&lt;STRONG&gt;y2axis&lt;/STRONG&gt; display=(nolabel noline noticks) discreteorder=data; 
xaxis display=(nolabel noline novalues noticks) max=3000 reverse &lt;STRONG&gt;grid&lt;/STRONG&gt;;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 13:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/438920#M15143</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-02-21T13:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/439319#M15153</link>
      <description>&lt;P&gt;Okay, thanks a lot Sanjay, I will try that and let you know if it worked. my regards&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 15:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/439319#M15153</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-02-22T15:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: horizontal bar chart using sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/440123#M15181</link>
      <description>Thankyou very much Sanjay. It worked very fine. I have also in included the grid on the xaxis.</description>
      <pubDate>Mon, 26 Feb 2018 07:09:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/horizontal-bar-chart-using-sgplot/m-p/440123#M15181</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-02-26T07:09:33Z</dc:date>
    </item>
  </channel>
</rss>

