Adds a legend to a plot2D figure.
Usage
addLegend(
object,
fcol = "markers",
where = c("bottomleft", "bottom", "bottomright", "left", "topleft", "top", "topright",
"right", "center", "other"),
col,
bty = "n",
...
)Arguments
- object
An instance of class
MSnSet- fcol
Feature meta-data label (fData column name) defining the groups to be differentiated using different colours. Default is
markers.- where
One of
"bottomleft"(default),"bottomright","topleft","topright"or"other"defining the location of the legend."other"opens a new graphics device, while the other locations are passed tolegend.- col
A
characterdefining point colours.- bty
Box type, as in
legend. Default is set to"n".- ...
Additional parameters passed to
legend.
Details
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.