plot {relations} | R Documentation |
Visualize certain crisp endorelations by plotting a Hasse Diagram of their transitive reduction.
## 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)
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 sqare. |
... |
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). |
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.
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)) }