Plot spectra from tibble spectra objects.
plot_spc(spc_tbl, spc_tbl_2 = NULL,
x_unit = "wavenumber",
y = "spc", by = "unique_id",
graph_id_1 = "Set 1", graph_id_2 = "Set 2",
graph_id_1_col = "black", graph_id_2_col = "red",
xlab = expression(paste("Wavenumber [", cm^-1, "]")),
ylab = "Absorbance",
alpha = 0.2, legend = TRUE)Tibble that contains the first set of spectra to plot as list-column
Tibble that contains the second set of spectra (optional) to plot as list-column.
Character string describing the x axis unit. Default is
"wavenumber", which will produce a graph with wavenumbers on the
x axis with reversed number. If x_unit = "wavelength", the axis
will be in regular order (lower wavelengths in nm on the left and higher
on the right side of the axis).
Character string of list-column name in tibble where spectra of desired type are extracted to plot.
Character string of column that is used to group the spectra.
Default is "unique_id". If replica spectra are present in the file
and processed spectra resulting after averaging need to be plotted,
it is recommend to use "sample_id" as argument to group according
the sample_id column in the tibble(s) containing the spectra (spc_tbl
and spc_tbl_2).
Character string used for grouping the first spectra set
(spc_tbl) and producing
the label text accordingly. Default is "Set 1".
Character string used for grouping the second spectra set
(spc_tbl_2) and producing the label text accordingly. Default is
"Set 2"
Character string for the colour of the first spectra
set. Default is "black".
Character string for the colour of the first spectra
set. Default is "red".
Character string or mathematical expression
(use expression) for the x axis title. Default is
expression(paste("Wavenumber [", cm^-1, "]")).
Character string or mathematical expression
(use expression) for the y axis title. Default is "absorbance".
Double in between 0 and 1. Sets the transparency for the plotted spectra lines.
Logical whether to plot a legend for the spectra describing
its name selected in arguments graph_id_1 and graph_id_2.
Default is TRUE.