View source: R/manipulations.R
highlight_sample | R Documentation |
Highlight one or more sample spectra on a spectral image. Changes all un-selected sample_id
s to grey lines. Requires gghighlight::gghighlight()
to function.
Surligne un ou plusieurs spectres d'échantillons sur une image spectrale. Change tous les spectres sample_id
s non sélectionnés en lignes grises. Nécessite gghighlight::gghighlight()
pour fonctionner.
highlight_sample(ftir_spectra_plot, sample_ids, ...)
ftir_spectra_plot |
A plot generated by Un tracé généré par |
sample_ids |
A vector of one or more Un vecteur d'un ou plusieurs |
... |
Additional parameters to pass to Paramètres supplémentaires à passer à |
the FTIR plot as a ggplot2 object, with selected sample spectra highlighted.
le tracé FTIR en tant qu'objet ggplot2, avec les spectres de l'échantillon sélectionné soulignier.
gghighlight::gghighlight()
if (requireNamespace("ggplot2", quietly = TRUE) & requireNamespace("gghighlight", quietly = TRUE)) {
# Generate a plot
p <- plot_ftir(sample_spectra)
# Highlight one sample:
highlight_sample(p, "isopropanol")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.