Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setlimits1D

Computes limits for 1D and 2D displays.


Description

Computes limits for 1D and 2D displays adding 10% of margins around the extreme values.

Usage

setlimits1D(mini, maxi, origin, includeOr)
setlimits2D(minX, maxX, minY, maxY, origin = c(0, 0), aspect.ratio = "iso", includeOr)

Arguments

mini

the smallest value of a unidimensional dataset

maxi

the largest value of a unidimensional dataset

minX

the smallest value of the first dimension of a bidimensional dataset

maxX

the largest value of the first dimension of a bidimensional dataset

minY

the smallest value of the second dimension of a bidimensional dataset

maxY

the largest value of the second dimension of a bidimensional dataset

origin

a value (in setlimits1D) or a two-length vector (in setlimits2D) indicating origin coordinate(s)

aspect.ratio

a character string to control physical aspect ratio of the graphic. iso for isometric scales, fill for drawing as big as possible or xy for banking rule

includeOr

a boolean value indicating whether the origin is included in the graphics window

Value

setlimits1D returns a two-length vector containing the limits of the graphics window on one axis.
setlimits2D returns a two-length list where the first element, named xlim, contains a two-length vector containing the limits of the graphics window on the first axis and the second, named ylim, contains the limits on the second axis.

Author(s)

Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray

Examples

setlimits1D(mini = -2, maxi = 2, origin = 0, includeOr = TRUE)
setlimits2D(minX = -2, maxX = 2, minY = -3, maxY = 4, origin = c(0, 0), includeOr = TRUE)

adegraphics

An S4 Lattice-Based Package for the Representation of Multivariate Data

v1.0-15
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr> and Aurélie Siberchicot <aurelie.siberchicot@univ-lyon1.fr>, with contributions from Jean Thioulouse. Based on earlier work by Alice Julien-Laferrière.
Initial release
2018-12-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.