setup_key: Key Setup

View source: R/utils.R

setup_keyR Documentation

Key Setup

Description

Try to setup a key while also dodging existing keys

Usage

setup_key(
  legend,
  key,
  default_key,
  fun,
  pos = c("right", "top", "bottom", "left")
)

Arguments

legend

a list of legends, usually the ⁠$legend⁠ slot of a trellis object.

key

A key specification, usually the user input.

default_key

The default key specifications that may be overridden by the user.

fun

The function to draw the key, such as lattice::draw.colorkey().

pos

Preferences for the position of the new key.

Value

The original legend object with the addition of the key defined by key, default_key, and fun.


tactile documentation built on May 31, 2023, 9:47 p.m.