Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: geom_elbow() #324

Open
fmarotta opened this issue Jul 14, 2024 · 0 comments
Open

Feature request: geom_elbow() #324

fmarotta opened this issue Jul 14, 2024 · 0 comments

Comments

@fmarotta
Copy link

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()

geom_elbow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant