Learn R Programming

multiplex (version 4.0)

hasse: Hasse Diagram of Set of Ordered Relations

Description

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

Usage

hasse(x, concept, attrs = NULL, main = NULL, incmp, shape = c("rectangle", 
    "circle", "box", "ellipse"), col, col0, fcol, ecol, lty, 
    lbs, ffamily, fstyle, fsize, cex.main, col.main, bg, mar, 
    sep, ...)

Value

A plot of a Hasse diagram with specified settings for a partial or a linear order of relations.

Arguments

x

An object of the “Partial.Order” class or a matrix representing ordered relations.

concept

(optional and logical) Plot a concept diagram?

attrs

(optional) Attributes for diagram.

main

(optional) Title of diagram.

incmp

(optional and logical) Include incomparable elements Hasse diagram?

shape

Shape of diagram vertices, otherwise “rectangle”:

  • rectangle

  • circle

  • box

  • ellipse

col

(optional) Colour of diagram vertices.

col0

(optional) Colour of vertices contour.

fcol

(optional) Font colour in vertices.

ecol

(optional) Edges colour in diagram.

lty

(optional) Edges shape in diagram.

lbs

(optional) Assign labels to elements in x.

ffamily

(optional) Font family of vertex labels.

fstyle

(optional) Font style of vertex labels:

  • bold

  • italic

  • bolditalic

fsize

(optional) Font size of vertex labels.

cex.main

(optional) Font size of main title.

col.main

(optional) Font colour of main title.

bg

(optional) Background colour.

mar

(optional) Margins of diagram plot.

sep

(optional, for concept lattice) Pair separator for pairwise relations inside intents and extents.

...

(optional) Additional graphical items.

Details

A Hasse diagram is a pictorical device to represent systems of partially ordered relations where the hasse function provides arguments for visual manipulation of the diagram. An example of a partially ordered system is the partial order table that is the outcome of the ‘strings’ option in the partial.order function.

Roman numerals are given for elements when the partial order table is not labelled.

See Also

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

Examples

Run this code
# load a dataset
data("incubA")

# a partial order of strings from dataset image matrix
po <- incubA |> getElement("IM") |> 
  as.strings() |> 
  partial.order(type="strings")

# plot the order relation as a Hasse diagram
if (FALSE) if(require(Rgraphviz)) {
plot(hasse(po))
}

Run the code above in your browser using DataLab