plot                package:relations                R Documentation

_V_i_s_u_a_l_i_z_e _R_e_l_a_t_i_o_n_s

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

     Visualize certain crisp endorelations by plotting a Hasse Diagram
     of their transitive reduction.

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

     ## S3 method for class 'relation':
     plot(x,
          attrs = list(graph = list(rankdir = "BT"),
                       edge = list(arrowsize = "0"),
                       node = list(shape = "rectangle",
                                   fixedsize = FALSE)),
          limit = 6L,
          labels = NULL,
          main = NULL,
          ...)

     ## S3 method for class 'relation_ensemble':
     plot(x,
          attrs = list(list(graph = list(rankdir = "BT"),
                            edge = list(arrowsize = "0"),
                             node = list(shape = "rectangle",
                                         fixedsize = FALSE))),
          ..., layout = NULL, main = NULL)

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

       x: an R object inheriting from class 'relation' .

   attrs: argument passed to the plot method for class 'graphNEL'. For
          the 'relation_ensemble' method, it is a _list_ of such
          objects, recycled as needed.

   limit: Argument passed to the labeling function creating default
          labels for the nodes (see 'LABELS').

  labels: Optional list of character vectors defining unique labels for
          the nodes.

  layout: integer vector of length 2 specifying the number of rows and
          columns of the screen layout.  If 'NULL', the layout is
          square.

     ...: Other arguments passed to the 'graphNEL' plot method.

    main: character vector used for the main title(s). If 'NULL', the
          title(s) is (are) set to the type of the visualized
          relation(s).

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

     Visualization requires that package 'Rgraphviz' is available. For
     partial orders, a Hasse diagram is plotted. In case of transitive
     complete relations (weak orders, preferences), the dual is
     plotted. For all other relations, the asymmetric part is plotted.
     Note that the default settings create a diagram with nodes ordered
     bottom-up and with no arrows.

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

     'relation'

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

     if(require("Rgraphviz")) {
       ## simple example
       plot(as.relation(1 : 5))

       ## inclusion on a power set:
       ps <- 2 ^ set("a", "b", "c")
       inc <- set_outer(ps, set_is_subset)
       plot(relation(incidence = inc))
     }

