library(photobiologyWavebands)
# ggplot() methods for spectral objects set a default mapping for x and y.
ggplot(sun.spct) +
geom_line() +
stat_wb_box(w.band = VIS(), ymin = -0.04, ymax = 0,
color = "black", fill = "white") +
stat_wb_label(w.band = VIS(), ypos.fixed = -0.02, color = "black")
ggplot(sun.spct) +
geom_line() +
stat_wb_hbar(w.band = PAR(), ypos.fixed = 0, size = 1) +
stat_wb_label(aes(color = ..wb.color..),
w.band = PAR(), ypos.fixed = +0.025) +
scale_color_identity()
Run the code above in your browser using DataLab