legend(x, y, legend, fill, col= "black",
lty, pch, bty= "o", bg= par("bg"), cex= 1,
xjust=0, yjust=1, x.intersp= NULL, y.intersp= NULL, merge = FALSE)
x
| the x location of the legend. |
y
| the y location of the legend. |
legend
| a vector of text values to appear in the legend. |
fill
| if specied, this argument will cause boxes filled with the specified colors to appear beside the legend text. |
col
| the color of points or lines appearing in the legend. |
lty
| the line types for lines appearing in the legend. |
pch
| the plotting symbols appearing in the legend. |
bty
| the type of box to be drawn around the legend. |
bg
| the background color for the legend box. |
cex
|
character expansion factor relative to current
par("cex").
|
xjust
| how the legend is to be justified relative to the legend x location. A value of 0 means left justified, 0.5 means centered and 1 means right justified. |
yjust
|
the same as xjust for the legend y location.
|
x.intersp
| character interspacing factor for horizontal (x) spacing. |
y.intersp
|
the same as x.intersp for vertical (y) line distances.
|
merge
|
logical; if TRUE, "merge" points and lines but not
filled boxes.
|
locator can be used
in place of the x and y arguments.
The default values for x.intersp and y.intersp are computed
from Cx <- cex * par('cex')
plot, barplot which uses legend(.).