dot-locateElement: Locate a plot element (e.g., a legend)

.locateElementR Documentation

Locate a plot element (e.g., a legend)

Description

This is a private function that locates a plot element.

Usage

.locateElement(x, y = NULL, inset = 0, width = 0.2, height = 0.5)

Arguments

x

Numeric or character. Describes the location of the legend. This is a numeric value (in which case y must also be supplied) indicating the x-coordinate of the top left of the box surrounding the legend. Alternatively, it is a character describing the position of the box surrounding the legend relative to the existing plot ('topleft', 'topright', 'bottomleft', 'bottomright', 'top', 'bottom', 'left', 'right', or 'center').

y

Numeric or NULL.

inset

Numeric. If x is a word describing the position of the legend, then this is the degree to which the legend is inset (or outset, if negative) relative to the figure's border. If two values are supplied then the first pertains to the horizontal offset and the second the vertical offset.

width

Numeric. Scaling factor for box width.

height

Numeric. Scaling factor for box height.

return

Coordinates of the upper left of the element.


adamlilith/legendary documentation built on July 28, 2023, 8:13 p.m.