View source: R/manipulations.R
add_band | R Documentation |
Add a shaded band (with optional text overlay) to a FTIR spectral region, to visually highlight an area.
Ajoutez une bande ombrée (avec un texte en option) à une région spectrale FTIR, pour mettre visuellement en évidence une zone.
add_band(
ftir_spectra_plot,
wavenumber_range,
text = NULL,
colour = NULL,
label_aesthetics = NULL
)
ftir_spectra_plot |
A plot generated by Un tracé généré par |
wavenumber_range |
A vector of length two, with the wavenumber range of the shaded band. Order of provided limits is not important. Un vecteur de longueur deux, avec la gamme de nombres d'ondes de la bande ombrée. L'ordre des limites fournies n'est pas important. |
text |
The text of the label over the band (optional). Le texte de l'étiquette au-dessus du bande (facultatif). |
colour |
A colour for the shaded band. Note that alpha will be set to 0.5.
A default blue band will be added if not provided.
See Une couleur pour la bande ombrée. Notez que la valeur alpha est fixée à 0,5.
Une bande bleue sera ajoutée par défaut si aucune valeur n'est fournie.
Voir |
label_aesthetics |
A named Une |
the FTIR plot as a ggplot2 object, with the shaded band added.
le tracé FTIR en tant qu'objet ggplot2, avec la bande ombrée ajoutée.
add_wavenumber_marker()
if (requireNamespace("ggplot2", quietly = TRUE)) {
# Generate a plot
p <- plot_ftir(sample_spectra)
# Add a band to -OH region:
add_band(p, c(3600, 3100), "-OH Stretch")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.