label_plot: Add labels to existing plot

Description Usage Arguments Value See Also Examples

Description

Uses a normalized coordinate system to add text anywhere on the current plot.

Usage

1
label_plot(labels, x, y, g = list(fontsize = 14, fontface = "bold"), ...)

Arguments

labels

character vector of labels to use

x

horz positions of items in labels

y

vert positions of items in labels

g

list of options passed to grid::gpar

...

optional args passed to grid::grid.text

Value

NULL. prints to current graphics device.

See Also

grid::grid.text, grid::gpar

Examples

1
2
3
4
5
example_plot()
label_plot(c('a label', 'another one'), c(.1, .9), c(.95, .1))

# use extra options from grid::grid.text
label_plot('last one', 0.5, 0.5, just='center')

iamamutt/ggdistribute documentation built on May 8, 2019, 3:12 a.m.