plot_interactive: Plot spectra interactively

View source: R/plotting_functions.R

plot_interactiveR 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

## Not run: 
# Create a spectra object
spec = as_spectra(spec_matrix_example, name_idx = 1)

# Start interactive plot
plot_interactive(spec)

## End(Not run)

annakat/spectrolab documentation built on Oct. 14, 2023, 1:16 a.m.