我是 Latex 的新手,想在 Tikz 中绘制以下网络:
The network is generated in R:
n = 100
p = 1.5/n
g = erdos.renyi.game(n, p)
# diameter
d = get.diameter(g)
E(g)$color = "grey"
E(g)$width = 1
E(g, path=d)$color = "red"
E(g, path=d)$width = 2
V(g)$color = "SkyBlue2"
V(g)[d]$color = "red"
coords = layout.fruchterman.reingold(g)
plot(g, layout=coords, vertex.label = NA, vertex.size=3)
我感谢您的帮助。