Internal function. Add a legend to a plot created by either ChemoSpec
or ChemoSpec2D
.
ChemoSpec2D
does not use symbols.
.addLegend(spectra, leg.loc, use.sym, ...)
None. Side effect is to modify an existing plot.
An object of S3 class ChemoSpec::Spectra()
or ChemoSpec2D::Spectra2D()
.
Either a list with elements x
and y
, or a string like 'topright'
. Values in a list should be on [0,1]
, i.e. the lower left of the plot area is 0,0
and the upper right is 1,1
. Allowed string values are those described in graphics::legend()
under 'Details'. A value of 'none'
is acceptable as well.
Logical; if true, the color scheme is set to black and the
points plotted with symbols. Applies only to ChemoSpec
.
Parameters to be passed to the plotting routines. Applies to base graphics only.
Bryan A. Hanson (DePauw University).