plot
produces an igraph
object and shows the Hasse diagram.
# S3 method for poset
plot(
x,
vertex.color = rgb(1, 1, 1, 1),
vertex.label = x$pointer$elements(),
vertex.label.color = rgb(0, 0, 0, 1),
vertex.label.family = "sans",
edge.color = rgb(0, 0, 0, 1),
edge.label = NA,
edge.arrow.mode = "-",
asp = 0,
...,
equispaced = FALSE,
show = TRUE
)
an igraph
object.
an S4 object of class Rcpp_POSet
, see poset
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
argument of the plot.igraph
function, see igraph.plotting
for details.
additional plotting parameters, see igraph.plotting
for details.
logical, if TRUE
the nodes on the same level of the Hasse diagram are horizontally equispaced.
logical, if TRUE
(default) the Hasse diagram is plotted.
plot.poset
computes the cover relation and produces the corresponding Directed Acyclic Graph (DAG), as an igraph
object, returned as invisible output.
Function layout_with_sugiyama
generates the DAG layout with edges oriented from top to bottom. When equispaced=TRUE
, nodes on the same Hasse diagram level are horizontally equispaced.
The Hasse diagram is displayed by a call to plot.igraph
(some default argument values are set to get a cleaner plot, by exploiting Hasse diagram properties.
Setting show = FALSE
produces the igraph
object, without showing the Hasse diagram.
Note that
poset
, igraph
, igraph.plotting
dom <- matrix(c(
"a", "b",
"c", "b",
"b", "d"
), ncol = 2, byrow = TRUE)
p <- poset(x = dom)
hasse <- plot(p)
class(hasse)
Run the code above in your browser using DataLab