briatte / ggnetwork

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

Node-faceting #7

Closed aterhorst closed 4 years ago

aterhorst commented 8 years ago

Hello,

I have multiple directed network objects (e.g. net1, net2, net3, ...) each with same number of nodes and node attributes. Only the edges are different (edges represent different relationships). The example provided in https://briatte.github.io/ggnetwork/#node-faceting appears to have only one network object. The output is exactly what I am after. I simply do not know how to deal with separate/multiple network objects. Please advise.

aterhorst commented 8 years ago

Perhaps I need to combine the networks into one network object. Then use network name as a facet variable. I will look into this.

briatte commented 8 years ago

Would you mind providing your data by using dput() and dumping the content somewhere, e.g. as a Gist or on Pastebin?

aterhorst commented 8 years ago

Sure. I have never used dput() before but seems straight-forward.

What I will do is provide 2x network objects. I will also provide my R script used to plot one network object. Will do so when I am in the office tomorrow. Thanks a ton.

aterhorst commented 8 years ago

Hi François

Here we go:

https://gist.github.com/aterhorst/fd3f9eeead8104feb5a382dbfd93522d

There are three files:

I hope this is sufficient for you.

Essentially I want node placement for net2 (and net3 …net9) to be same as net1 one 3 x 3 plot layout (as an example).

Thanks for your help!

Cheers

aterhorst commented 8 years ago

networks.pdf

Here is example what I am after generated using ggnetwork.

briatte commented 4 years ago

Hi @aterhorst

I have to apologise for letting this issue slip. I hope you have found a workaround, possibly by using something like the patchwork package to combine several plots into one. The package did not exist in 2016, so the solution at the time might have been using the grid package, although it is not the easiest package to use.

Again, very sorry that I let your question slip. Best,

François