<?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 add a significance symbol to the data label in proc sgpanel in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815937#M22879</link>
    <description>&lt;P&gt;Thank you. I saw that solution but it only adds an asterisk alone. I want to add an asterisk to the current data label which contains numeric values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 17:51:20 GMT</pubDate>
    <dc:creator>fbm</dc:creator>
    <dc:date>2022-05-31T17:51:20Z</dc:date>
    <item>
      <title>How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815923#M22874</link>
      <description>&lt;P&gt;I am trying to add a significance symbol like an asterisk to the data labels next to my hbars for the values that are significant. My code is below and the graph is shown.&lt;/P&gt;&lt;P&gt;proc sgpanel data=Figure_BarChart_Sex2 noautolegend;&lt;BR /&gt;panelby Rate Sex / layout=lattice novarname onepanel ;&lt;BR /&gt;hbar Site / group=sex response=AAPC CATEGORYORDER = RESPASC groupdisplay=cluster datalabel DATALABELFITPOLICY=NONE&lt;BR /&gt;datalabelattrs=(color=black size=10pt weight=bold) colorresponse=flag2 colormodel=(steelblue firebrick gold);&lt;BR /&gt;rowaxis display=(nolabel);&lt;BR /&gt;colaxis label="AAPC";&lt;BR /&gt;run;&lt;/P&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="fbm_0-1654017642684.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71914i9B9C0F68AA3B302C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fbm_0-1654017642684.png" alt="fbm_0-1654017642684.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815923#M22874</guid>
      <dc:creator>fbm</dc:creator>
      <dc:date>2022-05-31T17:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815927#M22875</link>
      <description>&lt;P&gt;How are you computing statistical significance? Where is the information stored?&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815927#M22875</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-31T17:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815930#M22876</link>
      <description>&lt;P&gt;It would be easiest to output the graphs in power point then add the asterisks manually:&lt;/P&gt;
&lt;P&gt;ods powerpoint file ="path to file/name.pptx";&lt;/P&gt;
&lt;P&gt;...your code here...&lt;/P&gt;
&lt;P&gt;ods powerpoint close;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815930#M22876</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2022-05-31T17:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815934#M22877</link>
      <description>&lt;P&gt;I computed statistical significance already using other software (joinpoint) and I have all the information stored in excel which I import into SAS. This graph is going to be used in a report (word and pdf) so I would like the asterisks to be part of the figure.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815934#M22877</guid>
      <dc:creator>fbm</dc:creator>
      <dc:date>2022-05-31T17:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815936#M22878</link>
      <description>&lt;P&gt;See this ( solved ) topic :&lt;BR /&gt;Adding a significance star in proc sgplot&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Adding-a-significance-star-in-proc-sgplot/td-p/767758" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Adding-a-significance-star-in-proc-sgplot/td-p/767758&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Solved by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;( who maybe wants to tell sthg. extra since this is PROC SGPANEL ? )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:48:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815936#M22878</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-05-31T17:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815937#M22879</link>
      <description>&lt;P&gt;Thank you. I saw that solution but it only adds an asterisk alone. I want to add an asterisk to the current data label which contains numeric values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815937#M22879</guid>
      <dc:creator>fbm</dc:creator>
      <dc:date>2022-05-31T17:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815938#M22880</link>
      <description>&lt;P&gt;I think you need to compute a new variable (probably a text variable) named GORILLA, which is the value of the response variable and it should have an asterisk appended if it is significant. I choose to name it GORILLA as it is unlikely your data set already has a variable by that name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then in the HBAR statement, use DATALABEL=GORILLA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use any other name you want, it doesn't really matter.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815938#M22880</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-31T17:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815939#M22881</link>
      <description>&lt;P&gt;If you are not calculating the statistic in the procedure then creating a variable to hold the label might be the easiest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example with the SASHELP.Class data set.&lt;/P&gt;
&lt;PRE&gt;data myclass;
   set sashelp.class;
   If name in ('Alice' 'John' 'Carol' 'Ronald' ) then significant='*';
   /* the actual datalabel variable*/
   dlabel= cats(put(height,f4.1),significant);
run;

proc sgpanel data=myclass;
   panelby age;
   hbar name /response=height datalabel=dlabel datalabelfitpolicy=none;
run;&lt;/PRE&gt;
&lt;P&gt;I know this doesn't look like your graph but the use of variable to hold a created label should work when the procedure is not using a statistic like Freq or Sum to create data label values. If it were, then pre-summarise the data, add a label variable and the HBARPARM perhaps for the plot if needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:56:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815939#M22881</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-05-31T17:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815945#M22882</link>
      <description>&lt;P&gt;Thank you! That worked. I made a new variable in excel that contained the values with an asterisk next to the significant ones and imported that into SAS and used that variable as the data label. Here is my revised code:&lt;/P&gt;&lt;P&gt;proc sgpanel data=Figure_BarChart_Sex2 noautolegend;&lt;BR /&gt;panelby Rate Sex / layout=lattice novarname onepanel ;&lt;BR /&gt;hbar Site / group=sex response=AAPC CATEGORYORDER = RESPASC groupdisplay=cluster datalabel=gorilla DATALABELFITPOLICY=NONE&lt;BR /&gt;datalabelattrs=(color=black size=10pt weight=bold) colorresponse=flag2 colormodel=(steelblue firebrick gold);&lt;BR /&gt;rowaxis display=(nolabel);&lt;BR /&gt;colaxis label="AAPC";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;And the figure:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fbm_0-1654021589732.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71917iED9CB7C9020093F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fbm_0-1654021589732.png" alt="fbm_0-1654021589732.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 18:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815945#M22882</guid>
      <dc:creator>fbm</dc:creator>
      <dc:date>2022-05-31T18:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a significance symbol to the data label in proc sgpanel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815946#M22883</link>
      <description>&lt;P&gt;Thank you! This looks like a great way to solve this issue. I will keep this example as a reference.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 18:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-add-a-significance-symbol-to-the-data-label-in-proc/m-p/815946#M22883</guid>
      <dc:creator>fbm</dc:creator>
      <dc:date>2022-05-31T18:28:34Z</dc:date>
    </item>
  </channel>
</rss>

