plot.parentslist: igraph plotting of DAGs (parentslist)

View source: R/plot_parentslist.R

plot.parentslistR Documentation

igraph plotting of DAGs (parentslist)

Description

igraph plotting of DAGs (parentslist)

Usage

## S3 method for class 'parentslist'
plot(
  x,
  col = c(context = "red", `context-partial` = "orange", partial = "blue", local =
    "purple", total = "black"),
  ...
)

Arguments

x

an R object of calss parentslist.

col

specification for the colors of the edge type.

...

additional parameters passed to plot.igraph.

Details

This function is a simple wrapper around igraph's plot.igraph. The parentslist object is converted to an igraph object with as_igraph and then passed to plot.igraph. Additional arguments ... are passed to the igraph plotting function, allowing customization.

Examples

 ## Not run: 
 model <- stages_bhc(full(Titanic))
 pl <- as_parentslist(model, silent = TRUE)
 plot(model, edge.label = NA)
 
## End(Not run)

gherardovarando/stagedtrees documentation built on July 5, 2025, 12:35 a.m.