plot_interactive {spectrolab} | R Documentation |
Plot spectra interactively
Description
Interactively plots spectra with a shiny app. Useful to inspect large datasets.
Usage
plot_interactive(
spec,
colpalette = function(n) RColorBrewer::brewer.pal(n, "Dark2"),
...
)
Arguments
spec |
spectra object |
colpalette |
a color palette function, e.g. rainbow, terrain.colors, or a function returned by colorRampPalette() or colorRamps package |
... |
Other arguments passed to plot |
Details
plot_interact
limits the number of spectra displayed at once to 600 for
performance reasons. As of now, the function does not return anything and does
not have side effects. This means that spectra can be selected and highlighted
but not yet deleted or subset from the shiny app.
Value
interactive plot
Author(s)
Jose Eduardo Meireles and Anna K. Schweiger
Examples
if(interactive()){
# Create a spectra object
spec = as_spectra(spec_matrix_example, name_idx = 1)
# Start interactive plot
plot_interactive(spec)
}
[Package spectrolab version 0.0.19 Index]