library(photobiologyWavebands)
# ggplot() methods for spectral objects set a default mapping for x and y.
ggplot(sun.spct) +
stat_wb_column(w.band = VIS_bands()) +
stat_wb_e_sirrad(w.band = VIS_bands(), angle = 90, size = 4,
label.fmt = "%1.2f", ypos.fixed = 0.1) +
geom_line() +
scale_fill_identity() + scale_color_identity()
ggplot(sun.spct, unit.out = "photon") +
geom_line() +
stat_wb_hbar(w.band = PAR(), size = 1) +
stat_wb_q_sirrad(aes(color = ..wb.color..),
w.band = PAR(), label.fmt = "mean = %.3g",
ypos.mult = 1, xpos.fixed = 390, hjust = 1) +
scale_color_identity()
Run the code above in your browser using DataLab