-
Notifications
You must be signed in to change notification settings - Fork 104
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
geom_mark_hull() label returns error in lines[[1]] - lines[[2]]: non-conformable arrays #291
Comments
I encountered this same issue when drawing hulls on a ggraph. Using the same graph |>
ggraph(layout = "stress") +
geom_mark_hull(
mapping = aes(x = x, y = y, group = groups_5, fill = groups_5, label = groups_5),
# con.type = "none",
expand = unit(1, "mm"),
) Uncommenting If you increase
traced to: Line 35 in 9be635c
|
I've seen both of these errors ( |
I'm afraid I can't provoke these errors on my own system. |
Sure, I reproduced it on two different machines (one Linux, one Mac) using library(ggforce)
library(ggraph)
library(tidygraph)
sessionInfo()
cairo_pdf(width = 7, height = 7)
graph <- highschool |>
filter(year == 1958) |>
as_tbl_graph() |>
mutate(popularity = centrality_degree(mode = "in"),
groups_2 = as.factor(group_edge_betweenness(n_groups = 2)),
groups_5 = as.factor(group_edge_betweenness(n_groups = 5)))
graph |>
ggraph(layout = "stress") +
geom_mark_hull(
mapping = aes(x = x, y = y, group = groups_5, fill = groups_5, label = groups_5),
# con.type = "none",
expand = unit(1, "mm"),
) Run with
Uncommenting the |
Ah - this was fixed by an unrelated PR. Should work on the dev version |
Hi there, thanks for all your incredible work on the ggplot2 ecosystem!
I am having an issue when using
geom_mark_hull()
with the label aesthetic. I am not at all experienced with this function so I apologize if I'm using it improperly or in an unexpected way 😬 : I created a reproducible example at the bottom.Referring to the reprex, the first plot works as you can see. The second graph fails and gives an error that appears to come from
elbow()
. The third graph works because I remove the label aesthetic. The issue seems to occur when groups overlap, I'm guessing something is happening when the elbow of multiple labels intersect 🤷Created on 2022-12-23 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: