# How to denote letters to mark significant differences in a bar chart plot

need your help to find a solution for my problem to indicate significant differences in a bar chart plot. The data of the statistical test is available in the following format:

Bar1-bar2:significant

Bar1-bar3:not significant

I want to mark significant differences between two bars with different letters (like bar1:a and bar2:b). If there is no significant differences between two bars they get the same letter (like bar1:a and bar3:a). Sort the right letters to the bars gets much more complex when the number of bars increases. I have several hundreds of statistical comparisons here and have to find a computer program that can generate the letters from the data for me.

Anybody an idea which programme can help me?

I have added an example plot with letter-coded significant differences to illustrate what I want to do.

*** If any one can help me to obtain a good reference material that guide to Interpretation and analysis of biological research data would be much grateful.

Attached a sample e.g.

Bar1-bar2:significant

Bar1-bar3:not significant

I want to mark significant differences between two bars with different letters (like bar1:a and bar2:b). If there is no significant differences between two bars they get the same letter (like bar1:a and bar3:a). Sort the right letters to the bars gets much more complex when the number of bars increases. I have several hundreds of statistical comparisons here and have to find a computer program that can generate the letters from the data for me.

Anybody an idea which programme can help me?

I have added an example plot with letter-coded significant differences to illustrate what I want to do.

*** If any one can help me to obtain a good reference material that guide to Interpretation and analysis of biological research data would be much grateful.

Attached a sample e.g.

## Popular Answers

Jochen Wilhelm· Justus-Liebig-Universität GießenYoav Benjamini and Yosef Hochberg

Journal of the Royal Statistical Society. Series B (Methodological)

Vol. 57, No. 1 (1995), pp. 289-300

Further, the barplot is not well suited to show so many groups. Better use a dot chart instead. Another option is to show the DIFFERENCES along with their confidence intervals (CIs) directly, also as a dot chart. Then there is no "significance labelling" required: the CIs of significant differences do not include the zero. It is possible to adjust the CIs for multiple testing, too. However, I would not do this. Instead I would indicate which differences can be selected to keep the desired false-discovery rate (e.g. by filled vs. open markers, by color, by line width, or by a "star").

Akila Wijerathna Yapa· Wayamba University of Sri lankaThank you very much for your kind reply

Dear Sir; (Jochen Wilhelm)

Really speaking I just wanted to know after statistical analysis, how to show the significance differences (S.D) in bar plots? Because in SPSS 16 and Minitab 15 don't give this function ( to show any symbol above the bar). I've analysed the data (ANOVA), but the problem was when writing the paper to show the S.D. in chart? because I couldn't find any automated S/W to denote symbols above the bars?

The way I asked the question may wrong?

for a e.g. as shown in this image I wanted to show S.D. above the bars like A,B..., unfortunately I couldn't see any easy steps in SPSS / MINITAB?

## All Answers (12)

Akila Wijerathna Yapa· Wayamba University of Sri lanka1) Select cells A2:B5

2) Select "Insert"

3) Select the desired "Column" type graph

4) Click on the graph to make sure it is selected, then select "Layout"

5) Select "Data Labels" ("Outside End" was selected below.)

If you don't want the Values as the Labels, you can click on the desired label, click twice so that it's the only thing selected, and then enter your new label information in the formula bar.

H.K. Ajith Premachandra· University of PeradeniyaJochen Wilhelm· Justus-Liebig-Universität GießenYoav Benjamini and Yosef Hochberg

Journal of the Royal Statistical Society. Series B (Methodological)

Vol. 57, No. 1 (1995), pp. 289-300

Further, the barplot is not well suited to show so many groups. Better use a dot chart instead. Another option is to show the DIFFERENCES along with their confidence intervals (CIs) directly, also as a dot chart. Then there is no "significance labelling" required: the CIs of significant differences do not include the zero. It is possible to adjust the CIs for multiple testing, too. However, I would not do this. Instead I would indicate which differences can be selected to keep the desired false-discovery rate (e.g. by filled vs. open markers, by color, by line width, or by a "star").

Akila Wijerathna Yapa· Wayamba University of Sri lankaThank you very much for your kind reply

Dear Sir; (Jochen Wilhelm)

Really speaking I just wanted to know after statistical analysis, how to show the significance differences (S.D) in bar plots? Because in SPSS 16 and Minitab 15 don't give this function ( to show any symbol above the bar). I've analysed the data (ANOVA), but the problem was when writing the paper to show the S.D. in chart? because I couldn't find any automated S/W to denote symbols above the bars?

The way I asked the question may wrong?

for a e.g. as shown in this image I wanted to show S.D. above the bars like A,B..., unfortunately I couldn't see any easy steps in SPSS / MINITAB?

Jochen Wilhelm· Justus-Liebig-Universität GießenAkila Wijerathna Yapa· Wayamba University of Sri lankaMengrao ZhangGraphPad software is an alternative.

I haven't tried it. However, from the Prism guide of web pages, it can. All you need is to perform a statistic analysis and then copy and paste the asterisks shown in the result to your graph. In addition, you can draw a horizontal line cap. here are the links:

http://www.graphpad.com/guides/prism/5/user-guide/prism5help.html?stat_how_to_unpaired5_average.htm

http://www.graphpad.com/guides/prism/5/user-guide/prism5help.html?stat_how_to_unpaired5_average.htm

MOREOVER, it gives you a 30 day trial to see if it works or not.

http://www.graphpad.com/demos/

Hope it helps.

Tamalika Saha· University of GuelphHi Akila,

Would you please tell me how you got SD using SPSS? I really need help with this one. I used Tukey's method but my prof wants graph like you showed as your example. Would you please let me know?

Thank you and Looking forward to hearing from you.

Akila Wijerathna Yapa· Wayamba University of Sri lankaHi Tamalika,

Sorry to disappoint you. Still I don't have a answer for this :D

What I do is using Excel Charts and labeling the selected bars and later rename the number according to letter I want ;)

if you found the method let me know

Bulat Islamov· Tallinn University of TechnologyHi Akila,

In Excel 2013 you create a separate column with your labels.

Then go design/add chart element/data labels/more data label options.

Choose "value from cells" and select range from column with your labels, unheck "value". Your labels will appear above the graph bars.

I didn't find option to choose value from cells in Excel 2007.

Victoria Ruiz· Universidad de SevillaHi Akila,

I use R to set letters or asterisks (or both) in my graphs. I use the HSD.test function + ggplot2 packaged and it works perfectly. This function performs all posible combinations automatically. Despite you have to know R language I totally recommend you to learn it. It's really useful and for a free-software enviroment.

Hope it helped.

Best wishes,

Victoria.

P.S.:here is an example of one of my plots.

P.S.: due to some people ask me about the R code I used, I leave here a link that could be useful. It's a function that I recently created which generates the tukey groups and asign them to the plot.

https://github.com/vicruiser/tukey_test_plot

Filipe Brogueira Rodrigues· University College LondonWhat about STATA? Anyone knows if it will do it?

Can you help by adding an answer?