legend_margin: Add legend with respect to figure instead of plot region....

Description Usage Arguments Author(s) See Also Examples

View source: R/plot.R

Description

Add legend with respect to figure instead of plot region. Wrapper around the function legend.

Usage

1

Arguments

x

Text string, the location of the legend relative to the figure region. Single keyword from the list 'bottomright', 'bottom', 'bottomleft', 'left', 'topleft', 'top', 'topright', 'right' and 'center'.

legend

Vector with text strings to appear in the legend.

adj

Numeric vector of length 1 or 2; the string adjustment for legend text.

...

Other parameters for specifying the legend (see legend).

Author(s)

Jacolien van Rij

See Also

Other Functions for plotting: addInterval(), add_bars(), add_n_points(), alphaPalette(), alpha(), check_normaldist(), color_contour(), dotplot_error(), drawDevArrows(), emptyPlot(), errorBars(), fill_area(), getCoords(), getFigCoords(), getProps(), gradientLegend(), marginDensityPlot(), plot_error(), plot_image(), plotsurface(), sortBoxplot()

Examples

1
2
3
4
plot(cars$speed, cars$dist, pch=16)
legend_margin('topleft', legend=c('points'), pch=16)
# compare with default legend:
legend('topleft', legend=c('points'), pch=16)

Example output



plotfunctions documentation built on April 28, 2020, 5:10 p.m.