plot.ceg: igraph's plotting for CEG

View source: R/2-plot-functions.R

plot.cegR Documentation

igraph's plotting for CEG

Description

igraph's plotting for CEG

Usage

## S3 method for class 'ceg'
plot(x, col = NULL, ignore = x$name_unobserved, layout = NULL, ...)

Arguments

x

an object of class ceg.

col

colors specification see plot.sevt.

ignore

vector of stages which will be ignored and left untouched, by default the name of the unobserved stages stored in x$name_unobserved.

layout

an igraph layout.

...

additional arguments passed to plot.igraph.

Details

This function is a simple wrapper around igraph's plot.igraph. The ceg object is converted to an igraph object by firstly obtaining the adjacency matrix representation with ceg2adjmat. If not specified, the default layout used is a rotated layout.reingold.tilford.

We use palette() as palette for the igraph plotting, while plot.igraph uses as default a different palette. This is to allow matching stages colors between plot.ceg and plot.sevt.

Examples

## Not run: 
 model <- stages_bhc(full(Titanic))
 model.ceg <- ceg(model)
 plot(model.ceg, edge.arrow.size = 0.1, vertex.label.dist = -2)
 
## End(Not run)

stagedtrees documentation built on April 29, 2022, 1:06 a.m.