layout.merge             package:igraph             R Documentation

_M_e_r_g_i_n_g _g_r_a_p_h _l_a_y_o_u_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Place several graphs on the same layout

_U_s_a_g_e:

     layout.merge(graphs, layouts, method = "dla",
            verbose = igraph.par("verbose"))
     piecewise.layout(graph, layout=layout.kamada.kawai, ...)

_A_r_g_u_m_e_n_t_s:

  graphs: A list of graph objects.

 layouts: A list of two-column matrices.

  method: Character constant giving the method to use. Right now only
          'dla' is implemented.

 verbose: Logical constant, whether to show a progress bar while doing
          the calculation.

   graph: The input graph.

  layout: A function object, the layout function to use.

     ...: Additional arguments to pass to the 'layout' layout function.

_D_e_t_a_i_l_s:

     'layout.merge' takes a list of graphs and a list of coordinates
     and places the graphs in a common layout. The method to use is
     chosen via the '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.

     The 'piecewise.layout' function disassembles the graph first into
     maximal connected components and calls the supplied 'layout'
     function for each component separately. Finally it merges the
     layouts via calling 'layout.merge'.

_V_a_l_u_e:

     A matrix with two columns and as many lines as the total number of
     vertices in the graphs.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'plot.igraph', 'tkplot', 'layout', 'graph.disjoint.union'

_E_x_a_m_p_l_e_s:

     # 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)
     ## Not run: plot(g, layout=lay, vertex.size=3, labels=NA, edge.color="black")

