I am currently analysing a multiplex network based on a dataset created by myself.
I want to be able to plot the network in a way that I can assign different colours to the two types of edges in by multiplex network.
The edgelist of this network looks like this
- the multiplex network is called multi_g
- it is an igraph object
- the two types of ties are trade_tie and bilateralaid_tie
- they edges are in different columns of the edgelist and hence in separated edge attributes
I tried to plot it with the following code:
plot(multi_g,
edge.color=c("brown", "green")[E(multi_g)$trade_tie+E(multi_g)$bilateralaid_tie],
edge.arrow.size = 0.5,
vertex.color="gray40",
vertex.label.color = "black",
layout= layout_with_fr)
By using this formula many edges are not plotted.
Thank you in advance for your help.
If there is a way to plot it with ggraph I would also really appreciate it!