Description Usage Arguments Details Author(s) See Also Examples

Plot `Speclib`

in a new plot or adding it to an existing plot.

1 2 |

`x` |
Object of class |

`FUN` |
Name of a function (character) or index or ID of single spectrum to plot (integer). |

`new` |
If FALSE the plot is added to active existing plot. |

`...` |
Further arguments passed to internal plot functions. |

The function may work in a couple of modes. The default way is to plot mean values (solid line) of all spectra and the standard deviations within bands. If data is assumed to be continuous the standard deviations are plotted as dashed lines otherwise error bars will indicate standard deviations.

The user has various options to change the way things are looking: With argument `FUN`

the name of a function, the ID or the index of a certain spectrum may be specified. Note that if `FUN`

is a function, this function will be applied to all spectra. If function should be applied to a subset of spectra, use function `subset`

to define rules excluding certain spectra.

By passing a subset, the user may specify a spectral range to plot. Limits for x- and y-axis will be found automatically or may be passed separately.

Lukas Lehnert

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
data(spectral_data)
## Set mask for channel crossing and water absorption bands
mask(spectral_data) <- c(1040, 1060, 1350, 1450)
## Simple example
plot(spectral_data, legend = list(x = "topleft"))
## Example with groups
plot(spectral_data, bygroups = TRUE, legend = list(x = "topleft"))
## Example with function
par(mfrow = c(2,3))
plot(spectral_data, FUN = "min", main = "Minimum of speclib")
plot(spectral_data, FUN = "max", main = "Maximum of speclib")
plot(spectral_data, FUN = "median", main = "Median of speclib")
plot(spectral_data, FUN = "mean", main = "Mean of speclib")
plot(spectral_data, FUN = "var", main = "Variance of speclib")
``` |

hsdar documentation built on May 26, 2019, 1:04 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.