pd_node_dimensions.Rd
Function to compute the dimensions of a node, providing values for the top, topright, right, bottomright, bottom, bottomleft, left, and topleft x and y-axis coordinates.
pd_node_dimensions(xy, wh)
A named vector with the x and y-axis coordinates for the center of the node.
A named vector with the width and height of the node.
A list with the assorted coordinates for the node.
pd_node_dimensions( c(x = .5, y = .5), wh = c( w = .1, h = .1 ) )
#> $topleft
#> x y
#> 0.45 0.55
#>
#> $top
#> x y
#> 0.50 0.55
#>
#> $topright
#> x y
#> 0.55 0.55
#>
#> $right
#> x y
#> 0.55 0.50
#>
#> $bottomright
#> x y
#> 0.55 0.45
#>
#> $bottom
#> x y
#> 0.50 0.45
#>
#> $bottomleft
#> x y
#> 0.45 0.45
#>
#> $left
#> x y
#> 0.45 0.50
#>
#> $center
#> x y
#> 0.5 0.5
#>
#> $width
#> w
#> 0.1
#>
#> $height
#> h
#> 0.1
#>