Annotate ggplot2 across both axis: text keeps changing position

You could try:

plot + annotate("text", x = -1, y = 14, label = "Helpful Text3", angle = 90) +
  annotate("text", x = -1, y = 0, label = "Helpful Text4", angle = 90) +
  coord_cartesian(ylim = c(0, 15), xlim = c(0, 10), clip = "off")

enter image description here

Just make sure you set fullrange = FALSE in geom_smooth when defining your plot.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top