-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Description
For the special case where a graph doesn't have any edges, calling geom_edge_link. For example, with a simple graph with three nodes and no edges, you can plot it if you do not call geom_edge_link():
graph <- list(nodes = tibble(1:3),
edges = tibble(from = vector("numeric"),
to = vector("numeric")))
tbl_graph(graph$nodes, graph$edges) %>%
ggraph(layout = "tree") +
geom_node_point() +
theme_graph()The result isn't that exciting, it is just three dots, but here it is:
If you then also call geom_edge_link, you get an error:
tbl_graph(graph$nodes, graph$edges) %>%
ggraph(layout = "tree") +
geom_node_point() +
geom_edge_link() +
theme_graph()Error in `$<-.data.frame`(`*tmp*`, "circular", value = FALSE) :
replacement has 1 row, data has 0
I would expect it to just not draw any edges.
Metadata
Metadata
Assignees
Labels
No labels