addLegend | R Documentation |
Place a legend in a plot using relative (0:1) coordinates.
addLegend(x, y, ...)
x |
x-axis coordinate in the range (0:1); can step outside. |
y |
y-axis coordinate in the range (0:1); can step outside. |
... |
arguments used by the function |
Jon T. Schnute, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC
addArrows
, addLabel
local(envir=.PBSmodEnv,expr={
oldpar = par(no.readonly=TRUE)
resetGraph()
n <- sample(1:length(colors()),15); clrs <- colors()[n]
addLegend(.2,1,fill=clrs,leg=clrs,cex=1.5)
par(oldpar)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.