plot.bgraph              package:igraph              R Documentation

_P_l_o_t _g_r_a_p_h_s _a_n_d _t_h_e_i_r _c_o_h_e_s_i_v_e _b_l_o_c_k _h_i_e_r_a_r_c_h_y

_D_e_s_c_r_i_p_t_i_o_n:

     This function plots 'bgraph' objects as output by
     'cohesive.blocks'. It produces a two-panel plot with the graph
     itself on the left and a tree representing the block hierarchy on
     the right.

_U_s_a_g_e:

     plot.bgraph(x, mc = NULL, vertex.size = 3, colpal = NULL, emph = NULL, ...)

_A_r_g_u_m_e_n_t_s:

       x: The 'bgraph' object to be plotted

      mc: A numeric vector listing the vertex connectivity of the
          maximally cohesive subgraph of each vertex. Automatically
          calculated if 'NULL' (leaving default is usually preferable).

vertex.size: The size of the vertices in the plot. Applies only to the
          graph, and not to the block-hierarchy tree.

  colpal: The color palette to use to distinguish block cohesion.
          Defaults to rainbow spectrum.

    emph: A numeric vector of blocks to emphasize. Useful for
          distinguishing specific blocks when it is unclear which
          higher-cohesion vertices belong to which block. (see details)

     ...: Other arguments to be passed on to 'plot.igraph' for the
          calculation of the graph (but not the hierarchy).

_D_e_t_a_i_l_s:

     Two plots are used to represent the cohesive blocks in a graph
     visually. The first is a standard plot with vertices colored
     according to their maximally-cohesive containing block. The second
     is a tree representing the hierarchical structure of the blocks,
     with edges representing a strict superset relationship.

     The 'emph' argument should be a numeric vector corresponding to
     the indices of blocks in 'x$blocks' and 'x$block.cohesion'
     (1-based indexing). The vertices of the specified blocks are
     emphasized by enlarging them and using a white border.

     The intended usage of this function is the quick plotting of a
     graph together with its block structure. If you need more
     flexibility then please plot the graph and the hierarchy (the
     'tree' graph attribute) separately by using 'plot.igraph'.

_A_u_t_h_o_r(_s):

     Peter McMahan peter.mcmahan@gmail.com

_S_e_e _A_l_s_o:

     'cohesive.blocks' for the cohesive blocks computation,
     'graph.cohesion', 'plot.igraph' and 'igraph.plotting' for regular
     igraph plotting, 'write.pajek.bgraph'.

_E_x_a_m_p_l_e_s:

     ## Create a graph with an interesting structure:
     g <- graph.disjoint.union(graph.full(4),graph.empty(2,directed=FALSE))
     g <- add.edges(g,c(3,4,4,5,4,2))
     g <- graph.disjoint.union(g,g,g)
     g <- add.edges(g,c(0,6,1,7,0,12,4,0,4,1))

     ## Find cohesive blocks:
     gBlocks <- cohesive.blocks(g)

     ## Plot:
     ## Not run: 
     plot.bgraph(gBlocks,layout=layout.kamada.kawai)
     ## End(Not run)

     ## There are two two-cohesive blocks. To differentiate the block 
     ## that contains both the three- and four-cohesive sub-blocks use:
     ## Not run: 
     plot(gBlocks,emph=3,layout=layout.kamada.kawai)
     ## End(Not run)

