diagram: Plot the Hasse Diagram of a set of ordered relations

diagramR Documentation

Plot the Hasse Diagram of a set of ordered relations

Description

A function to plot the Hasse Diagram of partially ordered relations.

Usage

diagram(x, attrs = NULL, main = NULL, incmp, cex.main, bg, mar, shape, 
       col, col0, fcol, ecol, lty, lbs, ffamily, fstyle, fsize, 
       col.main, sep, ...)

Arguments

x

a matrix representing ordered relations

attrs

(optional) attributes of the diagram

main

(optional) title of the diagram

incmp

(optional and logical) whether or not the incomparable elements should be included in the lattice diagram

cex.main

(optional) size of the diagram's title

bg

(optional) the background color of the diagram

mar

(optional) the margins of the plot

shape

(optional) the shape of the vertices

col

(optional) the color of the vertices

col0

(optional) the color of the vertices' contour

fcol

(optional) the color of the text's vertices

ecol

(optional) the color of the edges

lty

(optional) the shape of the edges

lbs

(optional) labels of the elements in the partially ordered set

ffamily

(optional) the font family of the vertex labels

fstyle

(optional) the font style of the vertex labels with options: ‘bold’, ‘italic’, ‘bolditalic’

fsize

(optional) the font size of the vertex labels

col.main

(optional) the font color of the main title

sep

(optional) the pair separator for the pairwise relations inside intents and extents

...

(optional) additional graphical items

Details

An example of ordered relations is found in the partial order table of relations, which is product of the 'strings' option in the partial.order function. Another set of ordered relations comes from the table produced on Galois derivations in the mentioned function.

In either case this function plot either the partial order or a linear order diagram, depending on the results as Hasse diagrams.

Value

A Hasse diagram of the partial order relation.

Warning

This function requires that the Rgraphviz package is available.

Note

Note that if the elements of the partial order are not labelled, Roman numerals will be given to each element.

Author(s)

Antonio Rivero Ostoic

See Also

partial.order, as.strings, strings, diagram.levels, galois.

Examples

## load the data
data("incubA")

## given e.g. a partial order table in the object 'po'
po <- partial.order(as.strings(incubA$IM), type="strings")


## plot the order relation as a Hasse diagram.
## Not run: if(require(Rgraphviz)) {
plot(diagram(po))
}
## End(Not run)

mplex/multiplex documentation built on April 9, 2024, 3:12 a.m.