Learn R Programming

DescTools (version 0.99.19)

Asp: Aspect Ratio

Description

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

Usage

Asp()

Arguments

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

Examples

Run this code
Asp()

Run the code above in your browser using DataLab