Texas A&M University-Commerce
Question
Asked 24th Dec, 2012
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.
![](profile/Akila-Wijerathna-Yapa/post/How-to-denote-letters-to-mark-significant-differences-in-a-bar-chart-plot/attachment/59d622c56cda7b8083a1d165/AS%3A271756734992385%401441803262467/image/5324ce489df2b9bf377d7f08f61de72da.jpg)
Most recent answer
To denote letters to mark significant differences in a bar chart plot, you can use different letters to show statistical significance. For all variables with the same letter, the difference between the means is not statistically significant. If two variables have different letters, they are significantly different.
Popular answers (1)
European Commission
Hi 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.
![](profile/Victoria-Ruiz-4/post/How-to-denote-letters-to-mark-significant-differences-in-a-bar-chart-plot/attachment/59d61fb479197b807797e255/AS%3A282980430958592%401444479200222/image/R+edited.png)
60 Recommendations
All Answers (58)
Hebrew University of Jerusalem
got one answer, In; Excel 2007, data labels are added through the "Data Labels" selection. As shown below, cells A2:A5 contain the data Items. Cells B2:B5 contain the data Values.
1) 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.
![](profile/Akila-Wijerathna-Yapa/post/How-to-denote-letters-to-mark-significant-differences-in-a-bar-chart-plot/attachment/59d62d09c49f478072e9e4e7/AS%3A273553847455755%401442231727373/image/9zm9l.jpg)
6 Recommendations
University of Peradeniya
I recommend you to use some statistical software like SPSS or SAS rather using excel . And follow ANOVA or t-test for your data. then you'll get annotations for significant differences based on p value.
9 Recommendations
Justus-Liebig-Universität Gießen
Akila, you write "I have several hundreds of statistical comparisons here". This sounds pretty much like a kind of a screening experiment (how would you otherwise formulate hundreds of well-thought hypotheses based on prior observations or models?). Hence, your scientific question is actually "WHICH of the following x-hundred comparison shows some difference?". Using null hypothesis tests straight away will give you a list of statistically significant differences, but MOST of them are likely to be false-positives (unless the majority of comparisons are anyway expected to show differences - but why do testing then?). In order to get an at least a little bit reliable result you must correct/adjust for multiple testing. Controlling the false discovery rate may be a good choice here.
Yoav 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").
15 Recommendations
Hebrew University of Jerusalem
Dear Ajith & Jochen;
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?
![](profile/Akila-Wijerathna-Yapa/post/How-to-denote-letters-to-mark-significant-differences-in-a-bar-chart-plot/attachment/5ae90464b53d2f63c3c93f3a/AS%3A273711939162117%401442269420002/image/Tycoparethenogenetic_figure_gif.jpg)
5 Recommendations
Justus-Liebig-Universität Gießen
I apologize that I did not answer your actual question. I don't use SPSS and I don't know the answer. But I hoped to give a useful comment on some other aspects related to barcharts, significance, and significance indicators. In case you won't be able to solve your original problem it might show you alternatives. Here is another one: If you have a lot of pairs (like those 3 pairs shown above) you might use a Bland-Altman plot to show the differences versus the averages.
3 Recommendations
GraphPad 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:
MOREOVER, it gives you a 30 day trial to see if it works or not.
Hope it helps.
1 Recommendation
University of Guelph
Hi 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.
Hebrew University of Jerusalem
Hi 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
![](profile/Akila-Wijerathna-Yapa/post/How-to-denote-letters-to-mark-significant-differences-in-a-bar-chart-plot/attachment/59d61e0579197b807797c644/AS%3A273765022273544%401442282075286/image/add-data-label.jpg)
Centre of Estonian Rural Research and Knowledge
Hi 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.
4 Recommendations
European Commission
Hi 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.
![](profile/Victoria-Ruiz-4/post/How-to-denote-letters-to-mark-significant-differences-in-a-bar-chart-plot/attachment/59d61fb479197b807797e255/AS%3A282980430958592%401444479200222/image/R+edited.png)
60 Recommendations
University of Michigan
I found this interesting tool to extract data from Bar charts , thought maybe helpful :
1 Recommendation
Autonomous University of Zacatecas
Hi Akila
Im using grapher 8 from golden software, my version its pretty old but still suits perfectly. I have no problem todd the significant labels to my graph bars, and graph quality you get is for publication.
3 Recommendations
Indian Council of Agricultural Research
Dear Akila Wijerathna Yapa,
You can download Daniel's XL toolbox. Write down a b c d. then Select bar diagram. Go to "annotate". Then "Levels". Followed by "These cells". "Annotate". Your work is done.
3 Recommendations
Texas A&M University
This Rcode works for Simple ANOVA but I am not sure how to modify it to work for factorial design anova. Suggestions are welcome!!
Cheers,
Ayush
1 Recommendation
Anhui Agricultural University (AHAU)
The statistical software Minitab provides the significance level with letters, you may put these letters(abc) on your graphs showing the level of significance.
The R language shows the significance level with letters, but its command based and not so easy for new users. some other statical softwares shows the level of significance with abc.
Ho Chi Minh City University of Science
Dear friend,
Here is a web application that resolve your problem easily, BioVinci.
It could draw a high quality scientific figure in seconds and easy to add ANY symbols or text to the chart just by clicking on anywhere on the chart to open a text box.
You could try the two-way ANOVA example here: https://vinci.bioturing.com/panel/workset/build/Two-way-ANOVA
![](profile/Alan-Phan/post/How-to-denote-letters-to-mark-significant-differences-in-a-bar-chart-plot/attachment/5ace4bafb53d2f63c3c53d83/AS%3A589449889083393%401517547213623/image/significant_symbols.png)
4 Recommendations
University of Alberta
# 1 Run your model and get the summary
summary(MyModel<-aov(Response~Group, data=my_hardwork))
if you have significant differences (P<0.05), do the following:
# 3 Load agricolae library
library(agricolae)
# 4 Run HSD test on your model (MyModel). "Group" is your grouping factor, the other group has to stay unchanged, i.e., group=TRUE
a<-HSD.test(MyModel,"Group", group=TRUE)
# 5
summary(a)
# Good luck
1 Recommendation
Eco-Systems
My favorite solution is using the asbio-package in R. The function pairw.anova or pairwise.kw allow to calculate posthoc-tests for ANOVA and Kruskall-Wallis tests. Then you can simply plot the results and it delivers the letters directly in the figure.
4 Recommendations
University of Education, Winneba
This can also be done manually in office word, insert picture- draw new canvas- copy and past your graph and using insert text you can write whatever you want to
Central Arid Zone Research Institute (CAZRI)
Akila Wijerathna Yapa Thanku your method of doing in excel was very helpful
1 Recommendation
Punjab Agricultural University
Add values on the bars, and then rename by selection of each individual value
1 Recommendation
University of Dar es Salaam
Abolfazl Ghoodjani , Thank you very much, it worked out quite simple
University of Alberta
In R, another way to get the letters on results is as follows:
summary(mymodel<-aov(variable~factor)) # if significant, do the following:
library(multcomp)
tuk <- glht(mymodel, linfct = mcp(factor= "Tukey"))
summary(tuk) # standard display
tuk.cld <- cld(tuk)
opar <- par(mai=c(1,1,1.5,1))
plot(tuk.cld) # letter-based display on a box and whisker plot
Good luck!
7 Recommendations
University of Alberta
Fakhria Wahid, what exactly is your question, can you be a little explicit with your question please? Are you using R or any other tool?
Wolaita Sodo University, Wolaita Sodo, Ethiopia
Dear all, I have the same problem how to add letter of significance on bar graph drawn using sigma plot. Any one who can suggest how to do it please.
Thank you
Abdul Wali Khan University Mardan
i have same problem of adding aplhabtes and how it come in Grph pad prisam?
1 Recommendation
Lasbela University of Agriculture, Water and Marine Sciences
Abolfazl Ghoodjani how can we do it on Prism, could you please define it more.
Thanks
Nanyang Technological University
An easy way; you can take your figures to ppt. and add the letters, then group them together and save the figures as photos.
3 Recommendations
Sir Run Run Hospital of Nanjing Medical University
How about using heatmap in R? anyone tried it?
3 Recommendations
Agricultural University of Athens
Essam Hebishy In SPSS after all the analyses and the post hoc tests, there is a table called "Homogeneous subsets". On the right there are the independent variables you used. You will see that they are grouped in categories according to the numbers 1,2,3 etc. In each group the treatments do not have statistical significance difference. So, denote a letter for each group: A for 1, B for 2, C for 3 etc. Then for each treatment write in which categories-letters it is. For example if a treatment appears in categories 1 and 2, the letters accompany it should be "ab". If another treatment appears in 2 and 4, the letters should be "bd". I hope it was helpful.
28 Recommendations
University of Lincoln
Thanks Eirini for your detailed answer, i found it really helpful. I will ask if I'm struggling. Regards,
Atmiya University
Eirini Evangelia Thomloudi hi, thank you so much for the elaborated answer. Can you please explain how we can add these in tables too?
Essam Hebishy hi. i hope you were able to use it. can you please share a video if possible?
PrismGraph pad will do. Click on (T) then click on top of the bar and type your letter. you can as well adjust the position of the letters by using your keyboard arrows to move the letters.Thanks
2 Recommendations
Agricultural University of Athens
Sagar Teraiya I am sorry but I do not understand your question. Could you please explain it a little?
Agricultural University of Athens
Updated Answer! The answer I provided above works in SPSS only in One Way ANOVA parametric test. In other statistical analyses as well as in other programs such as GraphPad etc, grouping with letters is not provided and needs to be done manually or using R programming. The following paper explains how to group multiple treatments and assign letters manually, and I strongly recommend it.
Piepho, Hans‐Peter. "Letters in mean comparisons: what they do and don’t mean." Agronomy Journal 110.2 (2018): 431-434.
7 Recommendations
Gulf Organisation for Research and Development
I used a software called statistix 8.1 or 10 now. It is also free software and very easy to use. Through this, you just need to apply your experimental design and then can determine significant digits by applying all pairwise comparisons (that will give you significance between the treatments).
4 Recommendations
University of Peradeniya
Dear all
Could you please send me the answer if it was a excel file
1 Recommendation
Quaid-i-Azam University
I'd suggest XLStat as it comes with perfect and much facile ways to perform complex statistical tests. It'd automatically make cluster bars with significant letters once your test.
Good Luck
3 Recommendations
Wolaita Sodo University
Dear Dr.
Can please share a full version of XLSTAT software, now I suffering fee case?
5 Recommendations
National Institute of Food Technology Entrepreneurship and Management - Thanjavur
Please watch this video - https://www.youtube.com/watch?v=qxQTkZjJ5bI
carefully. You may understand that easily.
1 Recommendation
Texas A&M University-Commerce
To denote letters to mark significant differences in a bar chart plot, you can use different letters to show statistical significance. For all variables with the same letter, the difference between the means is not statistically significant. If two variables have different letters, they are significantly different.
Similar questions and discussions
Recommendations
Since the early 1970’s, Norman Breslow has made enormous contributions to statistical theory and its applications in epidemiology, and he was a founding member and principal statistician of the Wilms Tumor Study Group, which is credited with great improvements in the treatment and understanding of this disease. Applications of the biostatistical me...