plot {colorSpec} | R Documentation |
plot spectra
Description
plot the spectra in a colorSpec object as lines or points
Usage
## S3 method for class 'colorSpec'
plot( x, color=NULL, subset=NULL, main=TRUE, legend=TRUE, CCT=FALSE, add=FALSE, ... )
Arguments
x |
a colorSpec object |
color |
If |
subset |
specifies a subset of |
main |
If |
legend |
If |
CCT |
If |
add |
If |
... |
other graphical parameters, see Details |
Details
Commonly used graphical parameters are:
type
passed to
lines.default()
, with defaulttype='l'
. Other valid values are'p'
(points),'b'
,'c'
,'o'
,'h'
,'S'
,'s'
, and'n'
, seeplot()
for their meanings.
An additionaltype='step'
is available. This option draws each spectrum as a step function, similar to'S'
and's'
, except that the jumps are between the wavelengths (with appropriate extensions at min and max wavelengths). The functionsegments()
is used for the drawing. Fortype='step'
,lwd
andlty
should be vectors of length 1 or 2. If the length oflwd
is 1, then horizontal segments are draw with that width, but vertical segments are not drawn. If the length oflwd
is 2, then vertical segments are draw with widthlwd[2]
. If the length oflty
is 2, then the styles are applied to the horizontal and vertical segments in that order. If the length oflty
is 1, then that style is applied to both horizontal and vertical segments. For examples of this plotting option, see the vignette Convexity and Transitions.lwd, lty
passed to
lines.default()
, except whentype='step'
when they are passed tosegments()
. In the former case these can be vectors, and components are passed sequentially to each spectrum, similar tomatplot()
. In the latter case, see the description intype
. The default value for both is 1.pch
passed to
lines.default()
, but it only has meaning whentype='p'
,'b'
, or'o'
. This can be a vector, and components are passed sequentially to each spectrum.ylab
If
ylab
is a string then it is passed on toplot.default()
, otherwise suitable default string is generated.xlim, ylim
If
xlim
andylim
are 2-vectors, they are passed toplot.default
. If one of the components isNA
then a suitable default is supplied.log
passed on to
plot.default()
. Care must be taken fory
because many spectra are 0 at some wavelengths, and even negative. Useylim
in such cases.
Value
TRUE
or FALSE
See Also
computeCCT()
,
subset()
,
lines()
,
segments()
,
plot()
,
matplot()
,
colorRamp()
Examples
plot( 100 * BT.709.RGB )
plot( xyz1931.1nm, add=TRUE, lty=2, legend=FALSE )