getAxisLimPlot: Get axis limits for a 'ggplot' plot from the input dataset.

View source: R/plots-utility-axes.R

getAxisLimPlotR Documentation

Get axis limits for a ggplot plot from the input dataset.

Description

Get axis limits for a ggplot plot from the input dataset.

Usage

getAxisLimPlot(
  data,
  xVar,
  yVar,
  xLim = NULL,
  yLim = NULL,
  facetPars = NULL,
  refLineData = NULL
)

Arguments

data

Data.frame with data.

xVar

String with column of data containing x-variable.

yVar

String with column of data containing y-variable.

xLim, yLim

Numeric vector of length 2 with limits for the x/y axes.

facetPars

List with facetting parameters, passed to the facetting function. Variables should be specified as character or formula. For 'wrap' facetting (facetType is 'wrap'), if the layout is not specified via nrow/ncol, 2 columns are used by default.

refLineData

Data used for the reference lines, as output of the getDataReferenceLines function.

Value

Data.frame with limits of the:

  • x-axis: 'xmin'/'xmax'

  • y-axis: 'ymin'/'ymax'

for each element of the facetting variable (if any).


clinDataReview documentation built on March 7, 2023, 5:13 p.m.