Learn R Programming

MetaNet (version 0.2.5)

transform_coors: Transform the layout of a 'coors' object

Description

This function applies various transformations to a 'coors' object, including scaling, aspect ratio adjustment, rotation, mirroring, and pseudo-3D perspective transformation.

Usage

transform_coors(
  coors,
  scale = 1,
  aspect_ratio = 1,
  rotation = 0,
  mirror_x = FALSE,
  mirror_y = FALSE,
  shear_x = 0,
  shear_y = 0
)

Value

A transformed 'coors' object with updated coordinates.

Arguments

coors

An object of class 'coors', containing node coordinates.

scale

A numeric value to scale the layout (default = 1).

aspect_ratio

A numeric value to adjust the Y-axis scaling (default = 1).

rotation

A numeric value in degrees to rotate the layout (default = 0).

mirror_x

A logical value indicating whether to mirror along the X-axis (default = FALSE).

mirror_y

A logical value indicating whether to mirror along the Y-axis (default = FALSE).

shear_x

A numeric value to apply a shear transformation in the X direction (default = 0).

shear_y

A numeric value to apply a shear transformation in the Y direction (default = 0).