<?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 Adding labels to countlabel option in sgplot vbar in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751557#M236598</link>
    <description>&lt;PRE&gt;proc sgplot data=Freq2Out;
  vbar ergRod/response=percent group=cyanToRed5dBGreater fillpattern nofill Groupdisplay=cluster datalabel=Count datalabelattrs=(size=12) name="ERG";
  format ergRod ergRod.;
  yaxis label = 'Percent of Participants (%)' labelattrs=(size=13) valueattrs=(size=13);
  xaxis label = 'Presence of Rod ERG' discreteorder=data labelattrs=(size=13) valueattrs=(size=13);
  keylegend "ERG"/ valueattrs=(Size=13)sortorder=ascending title="DAVF" titleattrs=(size=13) autoitemsize; 
run;
&lt;/PRE&gt;
&lt;P&gt;The "datalabel=Count" statement puts the counts of each bar at the top of the plot (Eg: 10, 20). I could like to add a label "n=", so that it shows as "n=10", "n=20" etc at the top of each bar. Is there any options in SAS to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 19:40:09 GMT</pubDate>
    <dc:creator>Abishekaa</dc:creator>
    <dc:date>2021-07-01T19:40:09Z</dc:date>
    <item>
      <title>Adding labels to countlabel option in sgplot vbar</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751557#M236598</link>
      <description>&lt;PRE&gt;proc sgplot data=Freq2Out;
  vbar ergRod/response=percent group=cyanToRed5dBGreater fillpattern nofill Groupdisplay=cluster datalabel=Count datalabelattrs=(size=12) name="ERG";
  format ergRod ergRod.;
  yaxis label = 'Percent of Participants (%)' labelattrs=(size=13) valueattrs=(size=13);
  xaxis label = 'Presence of Rod ERG' discreteorder=data labelattrs=(size=13) valueattrs=(size=13);
  keylegend "ERG"/ valueattrs=(Size=13)sortorder=ascending title="DAVF" titleattrs=(size=13) autoitemsize; 
run;
&lt;/PRE&gt;
&lt;P&gt;The "datalabel=Count" statement puts the counts of each bar at the top of the plot (Eg: 10, 20). I could like to add a label "n=", so that it shows as "n=10", "n=20" etc at the top of each bar. Is there any options in SAS to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 19:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751557#M236598</guid>
      <dc:creator>Abishekaa</dc:creator>
      <dc:date>2021-07-01T19:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Adding labels to countlabel option in sgplot vbar</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751577#M236603</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;is there a way?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 21:48:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751577#M236603</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-07-01T21:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding labels to countlabel option in sgplot vbar</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751667#M236656</link>
      <description>&lt;P&gt;I would use the XAXISTABLE statement to put the summary statistics under the bars. See&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2013/12/16/grouped-bar-chart-with-statisticstable/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2013/12/16/grouped-bar-chart-with-statisticstable/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 09:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751667#M236656</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-07-02T09:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding labels to countlabel option in sgplot vbar</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751673#M236658</link>
      <description>Thank you, Rick &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 02 Jul 2021 10:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-labels-to-countlabel-option-in-sgplot-vbar/m-p/751673#M236658</guid>
      <dc:creator>Abishekaa</dc:creator>
      <dc:date>2021-07-02T10:03:50Z</dc:date>
    </item>
  </channel>
</rss>

