<?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 order the Bars and display the labels from other var in PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-order-the-Bars-and-display-the-labels-from-other-var-in/m-p/968062#M25578</link>
    <description>&lt;P&gt;What you want is the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;vbar subjid/response = pchg categoryorder=respdesc;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will put the bars in descending response order.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 05:30:25 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2025-06-04T05:30:25Z</dc:date>
    <item>
      <title>How to order the Bars and display the labels from other var in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-order-the-Bars-and-display-the-labels-from-other-var-in/m-p/968061#M25577</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is generating the waterfall&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data adtr_2;
  set adtr;
  postion+1;
run;

ods listing close;
ods graphics/reset = all imagename="14_2_9_1_waterfall" width=10.0in height=7.0in;
proc sgplot data=adtr_2;
  refline 50/ axis = y 
              labelloc = outside 
              labelpos = auto 
              lineattrs=(pattern=shortdash color=black)
			  label = "50 % Reduction from Baseline";
  refline -50/ axis = y 
              labelloc = outside 
              labelpos = auto 
              lineattrs=(pattern=shortdash color=black)
			  label = "-50 % Reduction from Baseline";


vbar subjid/response = pchg ;

xaxis label = "Patient Number" fitpolicy = ROTATE;
yaxis label = "Maximum Percent Reduction from Baseline in SPD" min=-100 max=100 values=(-100 to 100&amp;nbsp;by&amp;nbsp;20);

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="raja777pharma_0-1749009719678.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107546i98A936584C31274A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="raja777pharma_0-1749009719678.png" alt="raja777pharma_0-1749009719678.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the Bars order by PCHG value rather than SUBJID&amp;nbsp; and&amp;nbsp;display the SUBJID as labels for bars.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i use the POSTION var ,below output one is coming , but i want the SUBJID display instead of POSTION values in x axis labels&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;vbar postion/response = pchg ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="raja777pharma_1-1749009919502.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107547i6A328B6DC5634EAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="raja777pharma_1-1749009919502.png" alt="raja777pharma_1-1749009919502.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my data :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="raja777pharma_2-1749010093154.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107548i5875CA9DB3259F14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="raja777pharma_2-1749010093154.png" alt="raja777pharma_2-1749010093154.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Raja.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 04:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-order-the-Bars-and-display-the-labels-from-other-var-in/m-p/968061#M25577</guid>
      <dc:creator>raja777pharma</dc:creator>
      <dc:date>2025-06-04T04:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to order the Bars and display the labels from other var in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-order-the-Bars-and-display-the-labels-from-other-var-in/m-p/968062#M25578</link>
      <description>&lt;P&gt;What you want is the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;vbar subjid/response = pchg categoryorder=respdesc;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will put the bars in descending response order.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 05:30:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-order-the-Bars-and-display-the-labels-from-other-var-in/m-p/968062#M25578</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-06-04T05:30:25Z</dc:date>
    </item>
  </channel>
</rss>

