display                package:giRaph                R Documentation

_M_a_k_e _a _d_i_s_p_l_a_y _o_f _t_h_e _g_r_a_p_h _u_s_i_n_g _t_h_e _g_r_a_p_h_i_c_s _w_i_n_d_o_w

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

     Uses the package 'mathgraph' to create a simple display of a
     simple graph

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

     display(x, ...)

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

       x: an object of class 'simpleGraph-class'.

     ...: further arguments passed to 'plot.mathgraph'.

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

     A display in the grpahics window.

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

     Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca

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

     'simpleGraph-class','plot.mathgraph'

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

     G<-new("incidenceList",
            V=letters[1:12],
            E=list(
                   d(6,5,c(2,4),c(1,3)),
                   u(2,4,5),
                   d(2,4),d(4,2),
                   d(1,7),d(3,7),d(4,7),
                   d(5,8),d(5,8),d(5,8),
                   u(6,9),d(6,9),
                   u(9,9),
                   d(9,8),d(9,12),
                   u(7,8),u(8,12),u(12,11),u(11,7),
                   u(11,8),
                   d(11,10)
                  )
           )

     sg <- new("simpleGraph",adjacencyMatrix=as(G,"adjacencyMatrix"))
     display(sg)

     gg <-new("generalGraph",incidenceList=G)
     display(gg)

