getLims: Get xlim/ylim ranges for plots from real values

View source: R/utils.R

getLimsR Documentation

Get xlim/ylim ranges for plots from real values

Description

Get xlim/ylim ranges for plots from real values

Usage

getLims(..., perc = 0.99, symm = TRUE)

Arguments

...

one or more vectors of real values

perc

percentage of dynamic range that should be covered by the limits; if set to 1 the whole range is used.

symm

logical value; if set to TRUE, the range will be symmetric around zero

Examples


myX <- rnorm(100, mean=1)
myY <- rnorm(100)
myLim <- getLims(myX, myY, perc=0.99)
plot(myX, myY, xlim=myLim, ylim=myLim)
mySymmLim <- getLims(myX, myY, perc=0.99, symm=TRUE)
plot(myX, myY, xlim=myLim, ylim=mySymmLim)



bedapub/ribiosPlot documentation built on Sept. 1, 2023, 6:50 p.m.