Questions tagged [ggpubr]

An R package to prepare publication ready plots based on the ggplot2 plotting system.

532 questions
0
votes
1 answer

Adding evolution lines to a stacked barplot

I would like to add lines on my stacked barplot in order to bring out the evolution group by group. Currently, I found an alternative solution with the ggpubr package. Any help will be appreciate ! Thanks ! # My dataset dff # day composition…
0
votes
1 answer

Error Adding p-value to parallel coordinates plot (ggplot)

I have a data set that is paired data from multiple samples that I want to do a parallel coordinates graph with and include a p-value above (i.e. plot each data point in each group and link the pairs with a line and have the comparison statistic…
0
votes
1 answer

adding anova test result in box plot by ggpubr in r

I have my data below and I would like to plot a multiple box plot with the ANOVA test result shown on the plot. > combined SampleID chao1 Samples Sgroup Bgroup Duration 1 BSS21 1275.1071 BSS20 BSS S 20d 2 BSS22…
Lennon Lee
  • 194
  • 1
  • 14
0
votes
1 answer

Adding p-values to compare groups means at different at times in gganimate gif with boxplots/violins

My current code for printing violins using gganimate looks like this library(ggplot2); library(gganimate); library(ggpubr) ggplot(dat2, aes(x=diet, y=bicep, fill=diet)) + geom_violin() + scale_fill_manual(values=c("#00AFBB", "#FC4E07")) + …
DiscoR
  • 247
  • 2
  • 11
0
votes
1 answer

ggpubr -> ggline plot: not able to reproduce examples with multiple factors

I have the feeling that R is not working properly on my system. I want to use an interaction plot to present my two-way ANOVA results. So I used the package ggpubr and am plotting with ggline using the example with multiple factors. It did not show…
Induriel
  • 1
  • 2
0
votes
0 answers

An error is raised when I use stat_compare_means

I tried with R to add the "p" values on a boxplot, but an error is raised when I use stat_compare_means. I looked quickly on google but I still do not understand ... Here is the boxplot I try to display : boxplot <- ggplot(data, aes(x = Produit, y…
Gleipnir
  • 53
  • 6
0
votes
1 answer

Change deviation point of ggbarplot

How can I change the deviation point of ggpubr::ggbarplot graph from 0 to 1. All the bars with values <1 face down with blue color using the example below library(ggpubr) # Load data data("mtcars") dfm <- mtcars # Convert the cyl variable to a…
Keniajin
  • 1,649
  • 2
  • 20
  • 43
0
votes
1 answer

putting multiple plots in one panel

I am trying to plot a scatter plot in R using ggscatter function from ggpubr package. I am showing you a subset of my data.frame tracking_id gene_short_name B1 B2 C1 C2 ENSG00000000003.14 TSPAN6 1.2 1.16 1.22 1.26 ENSG00000000419.12 DPM1…
user3138373
  • 519
  • 1
  • 6
  • 18
0
votes
0 answers

compare dependent proportions in a ggplot

My problem I would like to add results of a mcnemar.test (or another test that compares dependent proportions) to a Sankey Diagram using ggplot2 and ggalluvial My test data: df <- data.frame(timepoint=rep(0:2,…
captcoma
  • 1,768
  • 13
  • 29
0
votes
1 answer

Add ylabel and point shape change in ggpairs

ggpairs provide graph with two box plots connecting points to show before and after situation after giving an intervention. Want to change y axis label "Resist" "Suscept" instead of "3GCr" and "3GCs". And want to change data point with r default…
0
votes
1 answer

Adding axis labels and title to ggballoonplot()

The code I used and the result can be seen in the image below. The main problem is that the title doesn't appear in the center and the x and y labels don't appear at all. How do I fix this? The graph and code
StackUser
  • 1
  • 3
0
votes
1 answer

stat_compare_means() gives different p.value than compare_means() or t.test()

I would like to plot data with ggplot2 and add p-values using ggpubr. But the plotted p-values don't match the p-values I calculate with compare_means() or t.test(). This is my data: Group <- rep(c('A'), each=12) Drug <- rep(c('x','y'), each= 6) RC…
NRuecker
  • 3
  • 1
  • 3
0
votes
1 answer

How to preserve plot sizes when stacking with common x-axes in ggarrange?

I am trying to stack plots with common x- and y-axes in ggplot. What I want to do is have only the bottom plot show the x-axis labels and titles. But I've never been able to figure out how to do this cleanly in ggplot2 without having the bottom plot…
Ryan Utz
  • 51
  • 1
  • 6
0
votes
1 answer

Specify wilcox.test alternative using stat_compare_means with gpubr

I am using the stat_compare_means() plotting function from gpubr in R, and I'm trying to specify a left-tailed (or alternative = "less") specification for the wilcox.test. Unfortunately I cannot get the function to give me the ability to do…
Nick
  • 3,262
  • 30
  • 44
0
votes
2 answers

Change legend labels in ggpubr

Is there a way to customize the labels in a legend when utilizing ggboxplot? I have a barplot with a legend in which the labels are taken from the data frame columns. I would like to change these labels without having to change the label of the…
David
  • 67
  • 2
  • 9
1 2 3
35
36