size.Rd
Determine the size (width and height) of a node in an existing path diagram.
size(node)
A list with x and y
coordinates for the bottom, left,
top, right, and associated corners
for a node (e.g., see output of
add_nodes
or
add_lines_of_text
).
# Base figure
create_base_figure()
# Add nodes
nodes <- add_nodes(
c( N1 = 'Node-1|x=.25|y=.5',
N2 = 'Node-2\n Indent|x=.75|y=.5'
),
output = TRUE
)
# Dimension of nodes in diagram
size( nodes$N1 )
#> width height
#> 0.14644003 0.05351351
size( nodes$N2 )
#> width height
#> 0.1485304 0.1168919