Skip to main content

Questions tagged [ggpubr]

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

ggpubr
1 vote
0 answers
33 views

geom_point adds extra point at y max

Creating a box plot in R using ggboxplot. Using geom_point to add individual data points and position = position_jitter(width = 0.2)) to spread them out. The generated plot consistently adds an extra ...
Andrew Tilley's user avatar
0 votes
0 answers
18 views

Changing no. decimal points displayed for quantile values on boxplot [ggboxplot() + stat_summary(.."%1.1f"..)]

I am using R (v4.4.2). CONTEXT: I have a data frame, called "soil moisture", with relevant variables of Substrate (categorical values, "Dung" and "Sand") and SM (...
Olivia Jones's user avatar
0 votes
2 answers
46 views

Stat-cor not working. Keeps telling me to "transform_date"

I am just trying to add correlation data to the ggplot I am making about daily temperature readings. Here is the code I am using currently and the error it gives me. library(ggpubr) ...
Matt Schaaf's user avatar
1 vote
1 answer
19 views

Grouped barplots with error bars and pvalue pairwise comparisons

Am new to stackoverflow and would love some help. I have a dataset as below. I would like to create a barplot showing pairwise comparisons between treatment groups as shown but with significance stars ...
Kiplagat Noel's user avatar
0 votes
1 answer
40 views

Add normal curve to grouped histogram

for plotting histograms in R I usually use the gggpubr-package. Now I want to draw a grouped histogramm and add normal curves. My dataset is structured as follows: group <- rbinom (1000, 1, 0.5) ...
unicorn's user avatar
  • 63
2 votes
2 answers
69 views

Issue in aligning stat_cor r-value and p-value displayed on two lines in R

I am using stat_cor with ggplot to add r-value and p-value to a scatter plot. I have used label.sep = "\n" to display the r-value and p-value on two lines. However the labels are not aligned ...
accibio's user avatar
  • 533
1 vote
1 answer
29 views

Unable to align x-axis ticks using ggarrange

I am creating two graphs that use the same dataset and date range, though the top graph shows total specimens per month and the bottom shows typed and untyped specimens by year. Because of the ...
dr_Manhattan's user avatar
0 votes
0 answers
58 views

significance annotations with facet_wrap

I would like to add significance annotations with asterisks between the two bars in each facet of the plot produced by the following dataset and code. I have tried in vain to reach the desired result ...
falco's user avatar
  • 3
0 votes
0 answers
44 views

How to create a function in R to add emmeans-contrasts output to a ggplot-graphic?

I hope someone can help me with this problem. I have no background in computer science or programing, which makes it hard to understand why my code doesn't work. My goal is to create a number of plots,...
e.naslund's user avatar
0 votes
0 answers
26 views

Combine ggpubr and ggpattern packages

Has someone ever found a way to fill bareplot with stripes in ggbarplot (ggpubr package, one example below), using for example ggpattern package ? Thanks ! data <- mtcars data$cars <- rownames(...
guurmi's user avatar
  • 1
1 vote
1 answer
40 views

Differences in interquartile range calculations between IQR() and stats::quantile() in R and `ggpubr`

From my reading of the documentation associated with ggpubr::add_summary(), stats::IQR() and stats::quantile() I expected my use of median_iqr and median_q1q3 to return the same intervals. The ...
highlandsmain's user avatar
0 votes
0 answers
8 views

Data disappearing using ggarrange

I'm wanting to display 12 plots together using ggarrange, on their own each plot shows the data properly (boxplot) but when I use ggarrange I get them perfectly arranged, axis and labels, but no boxes ...
Matt Joel's user avatar
0 votes
0 answers
20 views

error while using ggarrange function to arrange multiple plots

I am trying to use ggarrange function from ggpubr package to plot multiple plot. But I a getting an error. Command used are: p <- ggplot(df, aes(x=factor(n_features,level = level_order), y=count, ...
Rhea Bedi's user avatar
  • 139
1 vote
1 answer
122 views

Add numbered/alphabetic labels beneath plots using ggarrange

I am trying to make a multiplot using ggarrange, with numbered/alphabetic labels below each plot. The example code below gives the correct labels, but they are incorrectly placed next to the plot ...
FredrikH-R's user avatar
1 vote
0 answers
22 views

How to Create a Scatter Plot of Proportion of Behavior versus Group Size in R using ggplot2?

I'm trying to visualize the relationship between the proportion of a specific behavior and group size for multiple observations (i have 3000 data points for n = 140 individuals) using a scatter plot ...
Paritosh ahmed's user avatar

15 30 50 per page
1
2 3 4 5
40