eempf_plot_comps: Plot all components of PARAFAC models

View source: R/parafac_plot_functions.R

eempf_plot_compsR Documentation

Plot all components of PARAFAC models

Description

The components can be plottet in two ways: either as a colour map or as two lines (emission, excitation wavelengths) intersecting at the component maximum. If the list of provided models is named, these names are shown in the plot. Otherwise, the models are automatically named by "model#".

Usage

eempf_plot_comps(
  pfres,
  type = 1,
  names = TRUE,
  contour = FALSE,
  colpal = "default",
  ...
)

Arguments

pfres

list of PARAFAC models

type

1 for a colour map and 2 for em and ex wavelength loadings

names

logical, whether names of components should be written into the plot

contour

in case of 3 dimensional component plots, contours are added

colpal

"default" to use the viridis colour palette, "rainbow" to use a subset of the rainbow palette, any custom vector of colors or a colour palette. A gradient will be produced from this vector. Larger vectors (e.g. 50 elements) can produce smoother gradients.

...

arguments passed on to other functions, e.g.

Value

object of class ggplot

Examples

data(pf_models)

eempf_plot_comps(pf4, type = 1)

# use a different colour scheme:
# eempf_plot_comps(pf4, type = 1, colpal = heat.colors(50))
eempf_plot_comps(pf4, type = 2)
eempf_plot_comps(list(pf4[[1]],pf4[[1]]), type=1)


staRdom documentation built on July 9, 2023, 5:57 p.m.