Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想比较两个具有完全相同节点的图(观察图和模拟图)。我想保持节点位置固定,以便比较边缘分布的差异。我试过 set.seed 但每次运行它时它只是保持情节相同。有没有办法获取图形的布局并将其用于另一个?谢谢,
Fwiw,我想您可以使用以下layout参数plot:
layout
plot
library(igraph) set.seed(1) g1 <- ba.game(20, dir=F) g2 <- ba.game(20, dir=F) par(mfrow = c(1, 2)) coords <- layout.fruchterman.reingold(g1) plot(g1, layout = coords) plot(g2, layout = coords)