add_legend_outside: add_legend_outside

Description Usage Examples

View source: R/add_legend_outside.R

Description

add a legend outside the plot. taken from: http://stackoverflow.com/questions/3932038/plot-a-legend-outside-of-the-plotting-area-in-base-graphics

Usage

1

Examples

1
2
3
4
5
par(mar = c(5, 4, 1.4, 0.2))
plot(rnorm(50), rnorm(50), col=c("steelblue", "indianred"), pch=20)
add_legend_outside("topright", legend=c("Foo", "Bar"), pch=20, 
                  col=c("steelblue", "indianred"),
                  horiz=TRUE, bty='n', cex=0.8)

livioivil/rospo documentation built on Nov. 26, 2019, 5:36 p.m.