repel_boxes: Adjust the layout of a list of potentially overlapping boxes.

View source: R/RcppExports.R

repel_boxesR Documentation

Adjust the layout of a list of potentially overlapping boxes.

Description

Adjust the layout of a list of potentially overlapping boxes.

Usage

repel_boxes(
  data_points,
  point_size,
  point_padding_x,
  point_padding_y,
  boxes,
  xlim,
  ylim,
  hjust,
  vjust,
  force_push = 1e-07,
  force_pull = 1e-07,
  max_time = 0.1,
  max_overlaps = 10,
  max_iter = 2000L,
  direction = "both",
  verbose = 0L
)

Arguments

data_points

A numeric matrix with rows representing points like rbind(c(x, y), c(x, y), ...)

point_size

A numeric vector representing the sizes of data points.

point_padding_x

Padding around each data point on the x axis.

point_padding_y

Padding around each data point on the y axis.

boxes

A numeric matrix with rows representing boxes like rbind(c(x1, y1, x2, y2), c(x1, y1, x2, y2), ...)

xlim

A numeric vector representing the limits on the x axis like c(xmin, xmax)

ylim

A numeric vector representing the limits on the y axis like c(ymin, ymax)

hjust

Optional horizontal adjustment of labels

vjust

Optional vertical adjustment of labels

force_push

Magnitude of the push force (defaults to 1e-7)

force_pull

Magnitude of the pull force (defaults to 1e-7)

max_time

Maximum number of seconds to try to resolve overlaps (defaults to 0.1)

max_overlaps

Maximum number of overlaps without triggering a warning

max_iter

Maximum number of iterations to try to resolve overlaps (defaults to 2000)

direction

Character, one of "x", "y", or "both

verbose

Boolean,


m-jahn/lattice-tools documentation built on Dec. 3, 2023, 11:14 p.m.