Asp: Get Aspect Ratio of the Current Plot

View source: R/DescTools.r

AspR Documentation

Get Aspect Ratio of the Current Plot

Description

Returns the aspect ratio of the current plot in user coordinates.

Usage

Asp()

Details

The aspect ratio of the plot is calculated as

w   <- par("pin")[1] / diff(par("usr")[1:2])
h   <- par("pin")[2] / diff(par("usr")[3:4])
asp <- w/h

Author(s)

Andri Signorell <andri@signorell.net>

Examples

Asp()

AndriSignorell/DescTools documentation built on Oct. 26, 2022, 10:30 a.m.