Skip to contents

Plot spectra

Usage

at_plot_spectrum(
  spectra,
  colour_by = c("label", "roi_id", "layer"),
  ribbon = TRUE,
  call = rlang::caller_env()
)

Arguments

spectra

The long tibble from at_extract_spectrum() or at_extract(). Its declared unit is used on the axis; absent units remain unknown. Mixed units reject: explicitly convert coordinates before combining them.

colour_by

One of "label", "roi_id", or "layer".

ribbon

Logical; draw a min-max ribbon per colour group (and statistic) wherever the group holds more than one ROI. Default TRUE.

call

The calling environment, for error reporting.

Value

A ggplot2::ggplot object with one line per ROI and statistic.