Sets the limits on the x- and y-axis of a ggplot based on manual input.

ggpLayerZoom(
  object = NULL,
  xrange = NULL,
  yrange = NULL,
  expand_x = c(0, 0),
  expand_y = c(0, 0),
  round = 2,
  n_breaks = 5
)

Arguments

object

An object of class spata2.

xrange, yrange

Vector of length two. Specifies the x- and y-range of zooming. E.g. xrange = c(200, 500) results in the plot being cropped from x-coordinate 200px up to x-coordinate 500px.

This argument works within the SPATA2 distance framework. If values are specified in SI units of length the input is immediately converted to pixel units.

expand_x, expand_y

Given to expand of ggplot2::scale_x/y_continuous().

See details and examples of ?is_dist and ?as_unit for more information.

Value

ggpLayer*()-functions return lists of ggproto objects that can be added to ggplots via the + operator. In most of the cases they are supposed to be added to plots created with the plotSurface*()

family.