plot.ceg {stagedtrees}R 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 with as_igraph. If not specified, the default layout used is a rotated layout.sugiyama.

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)

[Package stagedtrees version 2.3.0 Index]