Plot spectra colored by LOF values

plot_LOF_sp(
  obj,
  type = c("data", "differences", "centers"),
  stacked = TRUE,
  LOF_threshold = 10,
  x = "topleft",
  y = NULL,
  colors = c("black", "red"),
  LOF = obj$LOF
)

Arguments

obj

- LOF_obj object created with function get_LOF_by_class.

type

- type of plot, string wit one of the following: "data", "differences", "centers". May be abbreviated.

stacked

Either "TRUE" or vector with for stacking. More details in plotspc.

LOF_threshold

- LOF threshold values. Rows (lines) that have threshold above

x, y

position of legend. See legend.

colors

Colors names for LOF below and above threshold default are: c("black", "red").

LOF

- vector of lack-of-fit values for every row;

See also

Examples

library(spHelper)
obj <- get_LOF_by_class(Spectra2, "gr")
#> Warning: Function 'chk.hy' is deprecated. 
#> Use function 'assert_hyperSpec' instead.

plot_LOF_sp(obj, "data", "gr")
#> Warning: Function 'chk.hy' is deprecated. 
#> Use function 'assert_hyperSpec' instead.
#> Warning: Function 'function (...) 
#> {
#>     hySpc_deprecated("plot_spc")
#>     plot_spc(...)
#> }' is deprecated. 
#> Use function 'plot_spc' instead.

plot_LOF_sp(obj, "differences", "gr")
#> Warning: Function 'chk.hy' is deprecated. 
#> Use function 'assert_hyperSpec' instead.
#> Warning: Function 'function (...) 
#> {
#>     hySpc_deprecated("plot_spc")
#>     plot_spc(...)
#> }' is deprecated. 
#> Use function 'plot_spc' instead.

plot_LOF_sp(obj, "centers", "gr")
#> Warning: Function 'chk.hy' is deprecated. 
#> Use function 'assert_hyperSpec' instead.
#> Warning: Function 'function (...) 
#> {
#>     hySpc_deprecated("plot_spc")
#>     plot_spc(...)
#> }' is deprecated. 
#> Use function 'plot_spc' instead.