Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

addLegend

Add Legend


Description

Add Legend

Usage

addLegend(legend.loc = "topright", legend.names = NULL, col = NULL,
  ncol = 1, on = 0, ...)

Arguments

legend.loc

legend.loc places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center.

legend.names

character vector of names for the legend. If NULL, the column names of the current plot object are used.

col

fill colors for the legend. If NULL, the colorset of the current plot object data is used.

ncol

number of columns for the legend

on

panel number to draw on. A new panel will be drawn if on=NA. The default, on=0, will add to the active panel. The active panel is defined as the panel on which the most recent action was performed. Note that only the first element of on is checked for the default behavior to add to the last active panel.

...

any other passthrough parameters to legend.

Author(s)

Ross Bennett


xts

eXtensible Time Series

v0.12.1
GPL (>= 2)
Authors
Jeffrey A. Ryan [aut, cph], Joshua M. Ulrich [cre, aut], Ross Bennett [ctb], Corwin Joy [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.