briatte / ggnetwork

Geoms to plot networks with ggplot2
https://briatte.github.io/ggnetwork/
146 stars 28 forks source link

Different code depending on fortify method? #49

Closed briatte closed 5 years ago

briatte commented 5 years ago

The 'make nodes data of identical dimensions to edges data' code differs:

https://github.com/briatte/ggnetwork/blob/0bba28bccc7df6fa9c9d9ac33710f89470b2bdb8/R/fortify-igraph.R#L101-L103

https://github.com/briatte/ggnetwork/blob/0bba28bccc7df6fa9c9d9ac33710f89470b2bdb8/R/fortify-network.R#L179-L183

… and I have no idea why.

The code in fortify.network fails to pass tests if copy-pasted into fortify.igraph.