Closed brentocarrigan closed 5 years ago
The problème is that the variable day
is considered as numeric by the label function. You need to convert it as a factor variable before plotting.
Please, try this:
dat$day <- factor(dat$day, levels = c("0", "1"))
ggboxplot(data = dat,
x = 'day',
y = 'count',
facet.by = 'dose',
add = 'jitter',
palette = 'npg',
label = 'donor',
label.select = list(top.up = 2))
The output should look like this:
Outstanding, thank you! Problem solved
Thank you kassambara for an outstanding package in
ggpubr
!My question is similar to #50 and #190 but not a little different. If you wish to text label particular points with an ID, they seem to align incorrectly whether as a sole boxplot or facets. For example:
In the faceted boxplot they seem to both be aligned left. The
label.x.npc
and/orlabel.y.npc
arguments instat_compare_means
solves the similar problem of p-value positioning beautifully. Is there a similar fix when adding text labels?