I am trying to label facets with text, but they are overlapping in each Facet instead of just showing one by one. This is the code I have been using:
ggplot(df) +
aes(x = xvalues, y = yvalues) +
geom_point(size = 1, shape = 1) +
facet_wrap(~ model_f, ncol = 3) +
geom_text(data = df2, aes(x = 33, y = 2.2, label = test),
parse = TRUE, check_overlap = FALSE)
So with my data I should have 6 plots (plotted according to the model_f
column I have in my data), which I get. But when I try to use the geom_text
function with the data frame:
df2 <- data.frame(test = c("one", "two", "three", "four", "five", "six"))
Each facet plot gets all strings, but on top of each other. If I use the check_overlap = TRUE
function I just get the first element in each Facet, which is "one".
How do you make the text labels show on each facet individually?