ggpLayerFrameByCoords: Set plot limits

View source: R/g.R

ggpLayerFrameByCoordsR Documentation

Set plot limits

Description

Sets the limits on the x- and y-axis of a ggplot based on the coordinate range or the image range.

Usage

ggpLayerFrameByCoords(object = "object", opt = "coords")

ggpLayerFrameByImage(object = "object", opt = "coords")

Arguments

object

An object of class spata2.

opt

Specifies the function with which the limits are set. If 'scale' (the default), ggplot2::scale_x|y_continuous() is used. If 'coords', ggplot2::coord_cartesian() is used.

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.

Note

If 'scale', always adds ggplot2::coord_equal().


kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.