powered by
This is a wrapper for R's legend function. See R's documentation for graphics::legend for further details.
legend(x, y = NULL, legend, Rcss = "default", Rcssclass = NULL, ...)
position of the legend
character vector with labels (text appears in the legend)
style sheet object. Leave "default" to use a style defined via RcssSetDefaultStyle()
character, style class
Further parameters, see documentation of graphics::legend
# 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 DataLab