Skip to contents

Scale coordinates of a layout.

Usage

normalize(
  xmin = -1,
  xmax = 1,
  ymin = NULL,
  ymax = NULL,
  zmin = NULL,
  zmax = NULL
)

Arguments

xmin, xmax

Minimum and maximum for x coordinates.

ymin, ymax

Minimum and maximum for y coordinates. When omitted, they follow xmin and xmax; NULL disables normalization along this axis.

zmin, zmax

Minimum and maximum for z coordinates. When omitted, they follow xmin and xmax; NULL disables normalization along this axis.

Examples

layout_(make_ring(10), with_fr(), normalize())
#>             [,1]        [,2]
#>  [1,]  0.7738661 -0.63329611
#>  [2,]  1.0000000 -0.01457634
#>  [3,]  0.8336608  0.61930828
#>  [4,]  0.3436190  1.00000000
#>  [5,] -0.2645944  0.99545569
#>  [6,] -0.7727763  0.62808822
#>  [7,] -1.0000000  0.01209923
#>  [8,] -0.8366545 -0.62163536
#>  [9,] -0.3437400 -1.00000000
#> [10,]  0.2636660 -0.99741995