get_asp: Get aspect ratio from string or based on specific paper and...

View source: R/get_paper.R

get_aspR Documentation

Get aspect ratio from string or based on specific paper and margins

Description

Get aspect ratio from string or based on specific paper and margins

Usage

get_asp(
  asp = NULL,
  paper = NULL,
  orientation = NULL,
  margin = NULL,
  unit = NULL,
  block_asp = FALSE,
  null.ok = TRUE
)

Arguments

asp

Aspect ratio of width to height as a numeric value (e.g. 0.33) or character (e.g. "1:3"). If numeric, get_asp() returns the same value without modification.

paper

Paper, Default: 'letter'.

orientation

Orientation "portrait", "landscape", or "square", Default: 'portrait'.

margin

A margin style supported by get_margin(), a numeric vector (length 1 or 4) passed to dist parameter of get_margin, or a margins object.

unit

Unit for margin distance, Default: 'in'.

block_asp

If TRUE, get aspect ratio of the map/plot area (not including the margins); defaults to FALSE.

Value

A numeric aspect ratio.

Examples

get_asp("1:2")

get_asp(11 / 17)

get_asp(paper = "letter")

elipousson/overedge documentation built on Aug. 13, 2022, 7:41 p.m.