ggspectra >= 0.3.10

R Package Update
Author

Pedro J. Aphalo

Published

2023-02-03

Modified

2023-10-21

Keywords

ggspectra pkg

This update to ‘ggspectra’ tracks changes in ‘photobiology’ 0.10.15, ‘photobiologyWavebands’ 0.5.1 and ‘ggplot2’ 3.4.0, as well as in R 4.1.0. These are mostly deprecations that would trigger warnings. Please, be aware that these versions or later are now required.

The corrected definition of PAR() in ‘photobiologyWavebands’ 0.5.1 is code breaking as this change will cause some plots, especially annotations in them to change, when PAR() has been explicitly called in users’ code for quantities that are not photon based, in most cases with a warning.

New x scales and new functions for adding secondary x axes have been implemented.

Version 0.3.10: - Track bug fix in ‘photobiologyWavebands’, that updated the definition of PAR() (photosynthetically active radiation) as a BSWF (biological spectral weighting function). The previous definition of PAR() as a wavelength range returned a value that can be called “PAR” only when used to compute photon irradiance or photon exposure. This change does not affect the numerical values of energy irradiances or other spectral quantities when using autoplot() with the default w.band argument, but now the waveband is labelled PhR instead of PAR in such cases - Add sec_axis_energy_eV() and sec_axis_energy_J() to express wavelength as energy per photon, and sec_axis_wl() to allow a secondary wavelength axis with wavelengths expressed using a different scale factor than in the main axis. - Add scales scale_x_wavenumber_continuous(), scale_x_frequency_continuous(), scale_x_energy_eV_continuous() and scale_x_energy_J_continuous().

Version 0.3.11: - Bug fixes to autoplot() methods.

Version 0.3.12: - Improve autoplot() methods. Formatting of numbers in labels and handling of ylim arguments that subset the data.

Version 0.3.13: - Bug fixes. - Improve autoplot() methods, and fully support multiple spectra in long form.

library(ggspectra)
Loading required package: photobiology
News at https://www.r4photobiology.info/
Loading required package: ggplot2
autoplot(sun_evening.spct, unit.out = "photon")