<?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 do I change the datalabel title in SGPLOT VBAR? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/726831#M21164</link>
    <description>&lt;P&gt;Since you need more control, use the XAXISTABLE statement instead of the DATALABEL option to display your values. The code would look something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=mydata
styleattrs datacolors=(blue red) datalinepatterns=(solid);
vbar season_ / response=quantity
        group=condition limitstat=stderr numstd=1 stat=mean
	    limitattrs=(color=black thickness=1) dataskin=pressed attrid=condition 
        groupdisplay=cluster;
xaxistable quantity / stat=mean valueattrs=(size=12pt) location=inside 
        class=condition classdisplay=cluster label="Mean"; 
.....&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are additional option in the XAXISTABLE statement you might like. See the documentation for more details.&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Tue, 16 Mar 2021 16:55:44 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2021-03-16T16:55:44Z</dc:date>
    <item>
      <title>How do I change the datalabel title in SGPLOT VBAR?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/726806#M21163</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to show data labels on the bar chart like in the image.&lt;/P&gt;&lt;P&gt;My code looks like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=mydata
	styleattrs datacolors=(blue red) datalinepatterns=(solid);
	vbar season_ / response=quantity
        group=condition limitstat=stderr numstd=1 stat=mean
	datalabel=quantity datalabelattrs=(size=12pt) datalabelpos=bottom
	limitattrs=(color=black thickness=1) dataskin=pressed attrid=condition groupdisplay=cluster;
.....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would like to change the label "Ev (mean)" to another name I choose (for example just "mean"), does someone know if there is a way to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-03-16 at 16.01.55.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56022i352846DF3C03284B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-03-16 at 16.01.55.png" alt="Screenshot 2021-03-16 at 16.01.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 15:28:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/726806#M21163</guid>
      <dc:creator>marta25</dc:creator>
      <dc:date>2021-03-16T15:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the datalabel title in SGPLOT VBAR?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/726831#M21164</link>
      <description>&lt;P&gt;Since you need more control, use the XAXISTABLE statement instead of the DATALABEL option to display your values. The code would look something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=mydata
styleattrs datacolors=(blue red) datalinepatterns=(solid);
vbar season_ / response=quantity
        group=condition limitstat=stderr numstd=1 stat=mean
	    limitattrs=(color=black thickness=1) dataskin=pressed attrid=condition 
        groupdisplay=cluster;
xaxistable quantity / stat=mean valueattrs=(size=12pt) location=inside 
        class=condition classdisplay=cluster label="Mean"; 
.....&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are additional option in the XAXISTABLE statement you might like. See the documentation for more details.&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 16:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/726831#M21164</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-03-16T16:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the datalabel title in SGPLOT VBAR?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/727579#M21168</link>
      <description>&lt;P&gt;This is great, thank you for your help&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have another question: supposing I want to show also the frequency as a statistic, here is the code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	xaxistable quantity / stat=mean valueattrs=(size=12pt) location=inside position=bottom
        class=condition classdisplay=cluster label="Mean" labelattrs=(size=12pt);
    xaxistable quantity / stat=freq valueattrs=(size=12pt) location=inside position=bottom 
        class=condition classdisplay=cluster label="N" labelattrs=(size=12pt);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now the frequency (which I call N) has two decimal values (see screenshot). Do you know if there is a way to change the format, for instance to an integer with 0 decimal values?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-03-18 at 22.24.35.png" style="width: 532px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56138iBB1C1B2CF6A25EC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-03-18 at 22.24.35.png" alt="Screenshot 2021-03-18 at 22.24.35.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 21:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/727579#M21168</guid>
      <dc:creator>marta25</dc:creator>
      <dc:date>2021-03-18T21:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the datalabel title in SGPLOT VBAR?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/727752#M21171</link>
      <description>&lt;P&gt;The axis table is probably picking up the format from the "quantity" variable. You can work around this issue by using a little data step to copy the values from "quantity" to "quantity2" and setting a BEST. format on "quantity2". Then, use the "quantity2" variable for the FREQ axis table.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 13:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/727752#M21171</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-03-19T13:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the datalabel title in SGPLOT VBAR?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/727762#M21172</link>
      <description>Great! Thank you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1877"&gt;@Dan&lt;/a&gt;!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 19 Mar 2021 14:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-change-the-datalabel-title-in-SGPLOT-VBAR/m-p/727762#M21172</guid>
      <dc:creator>marta25</dc:creator>
      <dc:date>2021-03-19T14:11:56Z</dc:date>
    </item>
  </channel>
</rss>

