Skip to main content

Grid grob of a causal graph plot

Source: R/plot.R

Description

The grid grob that draws a plot built with cgraph_plot() or plot(), or an arrangement of plots from cgraph_plot_grid(), e.g. to embed it in another grid-based figure. grid::grid.draw() also draws a cgraph_plot directly.

Usage

Arguments

x A cgraph_plot or cgraph_plots object, or a graph created with cgraph() (plotted with the defaults).

Value

A grid grob (a gTree).

See Also

Other plotting: cgraph_layout(), cgraph_plot(), cgraph_plot_grid(), plot-styling, plot_default_options(), plot_options()

Examples

p <- cgraph_plot(cgraph("A --> X + Y, X --> Y"))
g <- cgraph_grob(p)
grid::grid.newpage()
grid::grid.draw(g)