toplegend | R Documentation |
Make a legend on top or right side of plot
toplegend(horiz = TRUE, ...)
rightlegend(...)
horiz |
Horizontal layout? |
... |
Further arguments to |
g <- rbinom(20, 1, 0.5)
x <- rnorm(20)
y <- rnorm(20)
plot(x, y, col=pal(2)[g+1], pch=19)
toplegend(legend=c('Group 1', 'Group 2'), col=pal(2), pch=19)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.