addLegend | R Documentation |
Adds a legend to a plot2D
figure.
addLegend(
object,
fcol = "markers",
where = c("bottomleft", "bottom", "bottomright", "left", "topleft", "top", "topright",
"right", "center", "other"),
col,
bg,
palette = "light",
t = 0.3,
pch,
lwd,
bty = "n",
unknown = "unknown",
...
)
object |
An instance of class |
fcol |
Feature meta-data label (fData column name) defining
the groups to be differentiated using different
colours. Default is |
where |
One of |
col |
A |
bg |
background (fill) color for the open plot symbols given
by |
palette |
A |
t |
A |
pch |
A |
lwd |
A |
bty |
Box type, as in |
unknown |
A |
... |
Additional parameters passed to |
The function has been updated in version 1.3.6 to recycle the
default colours when more organelle classes are provided. See
plot2D
for details.
Invisibly returns NULL
Laurent Gatto, Lisa Breckels
## Load an example MSnSet
library("pRolocdata")
data(dunkley2006)
## Adding a legend inside a plot
plot2D(dunkley2006)
addLegend(dunkley2006, where = "topleft")
## Adding a legend outside a plot
par(mfrow = c(1, 2))
plot2D(dunkley2006)
addLegend(dunkley2006, where = "other")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.