<?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 a significance star in a bar chart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335278#M11656</link>
    <description>&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to add a star (*) on top of the&amp;nbsp;bars that are significantly different (between the 2 endpoints) in a bar chart. Please see the code below. I've tried using DATALABEL, but SAS won't allow the labels for different bars to be the same. And I can't figure out how to use an annotated dataset here correctly. I'm using SAS version 9.3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my dataset I have 2 different endpoints (type) and 5 treatment groups (group).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SGPLOT DATA=work10;&lt;BR /&gt;VBARPARM CATEGORY=group RESPONSE=gm/ GROUP=type LIMITUPPER=Upper2;&lt;BR /&gt;XAXIS DISCRETEORDER=DATA;&lt;BR /&gt;YAXIS LABEL="Geometric mean (AU/mL)";&lt;BR /&gt;KEYLEGEND / TITLE="Groups";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to do this?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2017 14:05:55 GMT</pubDate>
    <dc:creator>DeniseQPS</dc:creator>
    <dc:date>2017-02-23T14:05:55Z</dc:date>
    <item>
      <title>Adding a significance star in a bar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335278#M11656</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to add a star (*) on top of the&amp;nbsp;bars that are significantly different (between the 2 endpoints) in a bar chart. Please see the code below. I've tried using DATALABEL, but SAS won't allow the labels for different bars to be the same. And I can't figure out how to use an annotated dataset here correctly. I'm using SAS version 9.3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my dataset I have 2 different endpoints (type) and 5 treatment groups (group).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SGPLOT DATA=work10;&lt;BR /&gt;VBARPARM CATEGORY=group RESPONSE=gm/ GROUP=type LIMITUPPER=Upper2;&lt;BR /&gt;XAXIS DISCRETEORDER=DATA;&lt;BR /&gt;YAXIS LABEL="Geometric mean (AU/mL)";&lt;BR /&gt;KEYLEGEND / TITLE="Groups";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:05:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335278#M11656</guid>
      <dc:creator>DeniseQPS</dc:creator>
      <dc:date>2017-02-23T14:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a significance star in a bar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335336#M11657</link>
      <description>&lt;P&gt;The key here is the LIMITUPPER request. Data labels over the bars are not allowed when LIMITUPPER/LIMITLOWER are used. Without that option, the DATALABEL option works as expected, as demonstrated by the following program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.class nway;
class age sex;
var weight;
output out=temp mean= uclm=uclm;
run;

data dlabel;
set temp;
if (sex eq 'M') then dlabel="*";
else dlabel=" ";
run;

proc sgplot data=dlabel;
vbarparm category=age response=weight / group=sex datalabel=dlabel groupdisplay=cluster;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Fortunately, you can use annotation to get around this issue. But, my question to you is, "Do you want the star on top of the bar, or at the end of the limit bar?".&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 16:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335336#M11657</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-04-24T16:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a significance star in a bar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335537#M11660</link>
      <description>&lt;P&gt;Thank you Dan, that explains why the datalabel option doesn't work. I would prefer the star to be at the end of the limit bar.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 09:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335537#M11660</guid>
      <dc:creator>DeniseQPS</dc:creator>
      <dc:date>2017-02-24T09:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a significance star in a bar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335931#M11669</link>
      <description>&lt;P&gt;Since you are using VBARPARM, you should be able to overlay a scatter plot with y=upper2 to plot markers where you want them.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 02:05:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/335931#M11669</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-02-26T02:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a significance star in a bar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/336149#M11671</link>
      <description>&lt;P&gt;Ah, thank you Sanjay. That seems to be doing the trick!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 10:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-significance-star-in-a-bar-chart/m-p/336149#M11671</guid>
      <dc:creator>DeniseQPS</dc:creator>
      <dc:date>2017-02-27T10:45:51Z</dc:date>
    </item>
  </channel>
</rss>

