Closed
Description
The direction of the curvature in geom_curve
is inconsistent with respect to other plot elements. This is easy to work around, but it would be nice if it were consistent.
See the following examples:
library(ggplot2)
p <-
ggplot(mtcars, aes(x = drat, y = mpg)) +
geom_point() +
annotate("curve", x = 4.5, xend = 4.5, y = 20, yend = 15, curvature = -1)
p + ggtitle("In the base plot, the curve arcs away from the points...")
p + coord_flip() +
ggtitle("Flipped, the curve arcs *towards* from the points...")
p + coord_flip() + scale_y_reverse()+
ggtitle("Flipped reversed, the curve arcs away from the points again!")
Created on 2022-11-30 with reprex v2.0.2