stocnet / manynet

Many Ways to Make, Manipulate, and Map Myriad Networks
https://stocnet.github.io/manynet/
Other
12 stars 0 forks source link

Nodes overlap with arrows in directed networks #78

Closed henriquesposito closed 2 months ago

henriquesposito commented 4 months ago

The directed network is plotted correctly but appears to be undirected because the arrows are covered by the nodes who are automatically sized at a later stage.

graphr(to_directed(ison_adolescents))
graphr(to_directed(ison_adolescents), node_size = 5)

Maybe this can help https://www.data-imaginist.com/posts/2017-02-16-ggraph-introduction-edges/. This would possibly not be an issue if edges were mapped after nodes in graphr().

henriquesposito commented 4 months ago

This has been fixed, now edges ending take into consideration node sizing (or mapping).

graphr(to_directed(ison_adolescents))
graphr(to_directed(ison_adolescents), node_size = 5)
to_directed(ison_adolescents) |>
  mutate(size = c(1:8)) |>
  graphr(node_size = "size")