
Last chance! 50% off unlimited learning
Sale ends in
layout.merge(graphs, layouts, method = "dla",
verbose = igraph.par("verbose"))
dla
is implemented.method
parameter, although right now only the dla
method is implemented. The dla
method covers the graph with circles.
Then it sorts the graphs based on the number of vertices
first and places the largest graph at the center of the layout. Then
the other graphs are placed in decreasing order via a DLA (diffision
limited aggregation) algorithm: the graph is placed randomly on a
circle far away from the center and a random walk is conducted until
the graph walks into the larger graphs already placed or walks too far
from the center of the layout.
plot.igraph
, tkplot
,
layout
, graph.disjoint.union
# create 20 scale-free graphs and place them in a common layout
graphs <- lapply(sample(5:20, 20, replace=TRUE),
barabasi.game, directed=FALSE)
layouts <- lapply(graphs, layout.kamada.kawai)
lay <- layout.merge(graphs, layouts)
g <- graph.disjoint.union(graphs)
plot(g, layout=lay, vertex.size=3, labels=NA, edge.color="black")
Run the code above in your browser using DataLab