Rcssplot (version 1.0.0)

legend: Add a styled legend to aplot

Description

This is a wrapper for R's legend function. See R's documentation for graphics::legend for further details.

Usage

legend(x, y = NULL, legend, Rcss = "default", Rcssclass = NULL, ...)

Arguments

x, y

position of the legend

legend

character vector with labels (text appears in the legend)

Rcss

style sheet object. Leave "default" to use a style defined via RcssSetDefaultStyle()

Rcssclass

character, style class

...

Further parameters, see documentation of graphics::legend

Examples

Run this code
# NOT RUN {
# add a legend to an existing plot
plot(1:8, 1:8, col=rep(c(1,2), each=4), pch=19)
legend(7, 3, c("A", "B"), pch=19, col=1:2)

# }

Run the code above in your browser using DataCamp Workspace