layoutGraph            package:Rgraphviz            R Documentation

_A _f_u_n_c_t_i_o_n _t_o _d_o _l_a_y_o_u_t _g_r_a_p_h _o_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     This is a wrapper to layout graph objects using arbitrary layout
     engines.

_U_s_a_g_e:

     layoutGraph(x, layoutFun = layoutGraphviz, ...)

_A_r_g_u_m_e_n_t_s:

       x: A graph object 

layoutFun: A function that performs the graph layout and returns a
          graph object with all necessary rendering information 

     ...: Further arguments that are passed t 'layoutFun' 

_D_e_t_a_i_l_s:

     Layout of a graph and rendering are two separate processes. This
     function provides an API to use any algorithm for the layout. The
     only requirements to the 'layoutFun' is to return a valid graph
     object with all the necessary rendering information stored in its
     'renderInfo' slot. This comprises

     for nodes:

_n_o_d_e_X, _n_o_d_e_Y the locations of the nodes

_l_w, _r_w the width components of the nodes, 'lw+rw=total width'

_h_e_i_g_h_t the heights of the nodes

_l_a_b_e_l_X, _l_a_b_e_l_Y node label locations

_l_a_b_e_l node label text

     for edges:

_s_p_l_i_n_e_s representation of the edge splines as list of 'BezierCurve'
     objects.

_l_a_b_e_l_X, _l_a_b_e_l_Y edge label locations

_l_a_b_e_l edge label text

     To indicate that this information has been added to the graph, the
     function should also set the laidout flag in the 'graphData' slot
     to 'TRUE' and add the bounding box information in the format of a
     two-by-two matrix as item 'bbox' in the 'graphData' slot.

     AT&T's 'Graphviz' is the default layout algoritm to use when
     'layoutGraph' is called without a specific 'layoutFun' function.
     See 'agopen' for details about how to tweak 'Graphviz'.

_V_a_l_u_e:

     An object inheriting from class 'graph'

_A_u_t_h_o_r(_s):

     Florian Hahne, Deepayan Sarkar

_S_e_e _A_l_s_o:

     'renderGraph', 'graph.par', 'nodeRenderInfo', 'edgeRenderInfo'

_E_x_a_m_p_l_e_s:

     library(graph)
     set.seed(123)
     V <- letters[1:10]
     M <- 1:4
     g1 <- randomGraph(V, M, 0.8)
     x <- layoutGraph(g1)

