define_lim_init: Define initial limits from a sequence of numbers.

View source: R/pretty_axis_support.R

define_lim_initR Documentation

Define initial limits from a sequence of numbers.

Description

. This function defines initial limits for a sequence of numbers.

Usage

define_lim_init(x, at = NULL, lim = NULL)

Arguments

x

A vector which contains user-supplied data.

at

(optional) A vector which contains user-supplied axis positions.

lim

(optional) A vector of length two which contains user-supplied limits.

Details

If the user has supplied limits, this function checks limits to ensure that they are sensible, and flags them with a 'user' attribute (so that user-defined limits are recognisable and remain fixed). If the user has not supplied limits, limits are extracted from axis tick mark positions, if specified, or otherwise from the data provided.

Value

This function returns a vector of two numbers representing initial limits.

Author(s)

Edward Lavender


edwardlavender/prettyGraphics documentation built on Jan. 19, 2025, 2:47 p.m.