getAbsoluteWidth: Translates "npc" widths into absolute units

View source: R/bezier_private_functions.R

getAbsoluteWidthR Documentation

Translates "npc" widths into absolute units

Description

The "npc" unit is not absolute, i.e. it depends on the relation between height and width within the current viewport. We therefore need to change these values to the value most likely intended. This is believed to be the main direction of the arrow as specified by the first and last bezier control points x and y.

Usage

getAbsoluteWidth(w, default.units, x = x, y = y)

Arguments

w

The width that is to be changed

default.units

A string indicating the default units to use if x or y are only given as numeric vectors.

x

A numeric vector or unit object specifying x-locations of spline control points.

y

A numeric vector or unit object specifying y-locations of spline control points.

Value

The width transformed into a unit of "mm"


gforge/Gmisc documentation built on Aug. 30, 2023, 7:38 a.m.