View source: R/S01-pd_functions.R
pd_draw_nodes | R Documentation |
Function that takes a list with node details and draws them on an existing figure (see [pathdiagrams::pd_base_figure]). Details for nodes can be added to a list via [pathdiagrams::pd_node].
pd_draw_nodes(
inputs,
args.polygon = NULL,
args.text = NULL,
args.arrows = NULL
)
inputs |
A named list, where each element corresponds to a node to add to the figure. |
args.polygon |
A named list, additional arguments to pass to the [graphics::polygon] function to apply to all nodes without pre-existing options already specified. |
pd_base_figure( default = '5 x 5' )
lst_inputs <- list() |>
pd_node( 'N01', c(x = .5, y = .8), string = 'Node-1' ) |>
pd_node( 'N02', string = 'Node-2',
from = c( N01.center = 0, N01.bottom = -1.5 ),
to = 'top - N01.bottom' )
pd_draw_nodes( lst_inputs )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.