2
$\begingroup$

In recent papers of Social Network Analysis , I have been observing this particular type of graph used increasingly. I looked for what they are called to replicate the graph, but couldn't find the name of it?

enter image description here

Plot Reference is here:

Bots increase exposure to negative and inflammatory content in online social systems

$\endgroup$
2
  • $\begingroup$ I do not know any special name for this. It just looks like a network diagram. It would not be hard to make a graph like this with the igraph package. Would an example from igraph be helpful? $\endgroup$
    – G5W
    Mar 20, 2019 at 21:32
  • $\begingroup$ Sure , How do I draw one using igraph ? $\endgroup$ Mar 20, 2019 at 22:18

1 Answer 1

3
$\begingroup$

Here is python code to make a pretty good match for your picture.

from igraph import * 

AM = [[1,3,1,0], [3,7,3,0], [0,1,9,1], [0,1,3,1]]

g = Graph.Weighted_Adjacency(AM)

g.vs["color"] = ["red", "blue", "blue", "red"]
g.vs["size"] = [30,40,40,30]
g.es["width"] = [2,5,2,5,9,5,2,13,2,2,5,2]
g.es["color"] = ["#FF000066", "#FF000066", "#FF000066", 
    "#0000FF66", "#0000FF66", "#0000FF66", 
    "#0000FF66", "#0000FF66", "#0000FF66", 
    "#FF000066", "#FF000066", "#FF000066"]
g.es["curved"] = [0.2, 0.2, 0.0, 0.2, 0.2, 0.2, 
        0.2, 0.2, 0.2, 0.0, 0.2, 0.2]

LO = [[0.0,1.0], [0.0,0.0], [1.0,0.0], [1.0,1.0]]

plot(g, layout=LO,  margin=150)

Network diagram

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.