Hi! I was looking for a geom that connects two points with an elbow, similar to ggplot2::geom_step() and ggraph::geom_edge_elbow(), but with x, y, xend, yend aesthetics. I tried to open an issue in ggplot2 but this feature is better suited for an extension package. I think it would fit well in ggforce, given that there are already geom_link() and geom_diagonal(). It would look something like this and I am happy to prepare a merge request, if you are interested.
test <- data.frame(
x = 1,
y = 1,
xend = 2,
yend = 2,
direction = "vh"
)
ggplot(test, aes(x = x, y = y, xend = xend, yend = yend, direction = direction)) +
geom_elbow()
Hi! I was looking for a geom that connects two points with an elbow, similar to
ggplot2::geom_step()
andggraph::geom_edge_elbow()
, but withx, y, xend, yend
aesthetics. I tried to open an issue in ggplot2 but this feature is better suited for an extension package. I think it would fit well in ggforce, given that there are alreadygeom_link()
andgeom_diagonal()
. It would look something like this and I am happy to prepare a merge request, if you are interested.