Closed andreasleha closed 7 years ago
A hacky 'solution' is to use a custom test
function which matches the passed vectors x
and y
and returns the corresponding text as p.value
of a list. But this is really just an ugly hack.
Hi, you can already define the text using the annotations
parameter:
ggplot(mpg, aes(class, hwy)) +
geom_boxplot() +
geom_signif(comparisons = list(c("compact", "midsize"), c("minivan", "suv")),
annotations = c("Nearby", "Far Apart"),
map_signif_level = TRUE, textsize=6) +
ylim(NA, 48)
Or did misunderstand your question?
No you did not mis-understand the question. I did not read the documentation carefully. annotations
is exactly what I was proposing.
To give full control to the user, it would be nice, if there was the possibility to pass a character vector to be plotted as the 'p value'. I am thinking of something along the lines
This is just a silly example, of course.