polar2just: Convert hjust and vjust parameters from polar coordinates

polar2justR Documentation

Convert hjust and vjust parameters from polar coordinates

Description

This function is how ob_label's vjust and hjust values are recalculated automatically when the polar_just parameter is specified.

Usage

polar2just(x, multiplier = NULL, axis = c("h", "v"))

Arguments

x

angle. Can be a named direction (e.g., "north"), number (in degrees), degree, radian, or turn

multiplier

distance

axis

vertical (v) or horizontal (h)

Value

ob_angle object

Examples

a <- "northwest"
polar2just(a, axis = "h")
polar2just(a, axis = "v")

ggdiagram documentation built on Sept. 15, 2025, 1:07 a.m.