Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upggbarplot help #28
ggbarplot help #28
Comments
Example: library(ggpubr)
ggbarplot(ToothGrowth, x = "dose", y = "len",
add = "mean_se",
error.plot = "upper_errorbar",
label = TRUE,
lab.nb.digits = 1, # Round to 1 decimal
lab.pos= "in") +
stat_compare_means(method = "wilcox.test",
comparisons = list(c("0.5","1"), c("1","2")),
label="p.format",
label.y = 30,
tip.length = 0.03 # customize the bracket whiskers
) |
|
Hello, That's the code I've run
Moreover, now also N.S. comparisons aren't showing up on the plot and I don't know why, do you? And,
Thanks again! |
|
Hi, I forgot to push the changes to github. Please, Install the latest developmental version and try it. It should work, thanks. |
|
Hello again, I have used Thanks again, |
|
Hi, A simple suggestion would be to play with the argument Use different bar widths for the different plots. For example: library("ggpubr")
p1 <- ggbarplot(ToothGrowth, x = "dose", y = "len",
add = "mean_se",
error.plot = "upper_errorbar",
width = 0.5)
p2 <- ggbarplot(ToothGrowth, x = "supp", y = "len",
add = "mean_se",
error.plot = "upper_errorbar",
width = 0.35)
ggarrange(p1, p2, nrow = 2)You can also read the different options presented at http://www.sthda.com/english/wiki/ggplot2-easy-way-to-mix-multiple-graphs-on-the-same-page. You can go directly to the section: "Change column/row span of a plot" |
|
Hello, Anyway, I am having the following error with some of the data
Do you know why?
This is how my data look like
Thanks a lot, |
|
Hi, Would you, please, provide a reproducible example with a demo data set? Thanks |
|
Too late, I was able to fix it :) |
|
Hi Gian77, I'm experiencing the same problem as you describe, how did you end up fixing yours? |
|
Hello Lisa, |





(e-mail from user)
I have made the plot you can see attached below.
Is there a way to customize the bracket whiskers?
is there a way to round to 1 decimal the number plotted in white within the bars?
Moreover I am using the flag label="p.format" but I still have the significance code instead of the p-value, where is my msitake there?