View source: R/plot-spc-extended.R
plot_spc_ext | R Documentation |
plot_spc_ext
is a custom plotting function developed
within the simplerspec framework. Returns plots based on ggplot2
(class "ggplot"). Different spectra types such as raw or preprocessed spectra
and groups can be differentiated by different colors or by using panels
(so called facets). Additionally, spectra can be colored based on an
additional measure variable, e.g. determined by chemical reference analysis.
plot_spc_ext(
spc_tbl,
spc_tbl_l = NULL,
lcols_spc = "spc",
lcol_measure = NULL,
lcol_measure_col_palette = "Spectral",
lcol_measure_col_direction = -1,
spc_id = "unique_id",
group_id = "sample_id",
group_id_order = TRUE,
group_color = TRUE,
group_color_palette = NULL,
group_panel = TRUE,
group_legend = FALSE,
ncol = NULL,
relabel_spc = TRUE,
ylab = "Spectrum value",
alpha = 0.5,
line_width = 0.2,
...
)
spc_tbl |
Tibble data frame containing spectra, x-axis values, metadata and eventual measured variables as list-columns. |
spc_tbl_l |
List of spectral tibbles (data frames). Default is
|
lcols_spc |
Character vector of spectral list-columns to be extracted.
Default is |
lcol_measure |
Character vector of length 1 denoting the column name
of the measure columns. This argument is optional. Default is |
lcol_measure_col_palette |
Palette value supplied to
|
lcol_measure_col_direction |
Sets the the order of colours in the scale
that is based on a measure column. Default is |
spc_id |
Character vector denoting column name for a unique spectrum ID.
Default is |
group_id |
Character vector denoting column name for the spectrum group
ID. Default is |
group_id_order |
Logical that specifies whether the panel names
derived from a numeric |
group_color |
Logical defining whether spectra are colored by the column
specified by |
group_color_palette |
Character (1L) defining the diverging colour
scales from colorbrewer.org; see |
group_panel |
Logical defining whether spectra are arranged into panels
by groups specified in |
group_legend |
Logical defining whether a legend for the |
ncol |
Integer vector of length 1. Defines number of columns when
plotting panels (facets). Default is |
relabel_spc |
Logical defining whether panels are relabeled with custom
names for spectra types. Default is TRUE. When |
ylab |
Character vector or vector of type |
alpha |
Integer of length 1, from 0 to 1. Defines transparency of
spectral lines. Default is |
line_width |
Numeric vector of length 1 specifying the width of the
spectral lines. Default is |
... |
Further arguments to be passed to |
Object of class "ggplot"
(ggplot2 graph).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.