# NOT RUN {
library(photobiology)
library(photobiologyWavebands)
library(ggplot2)
# ggplot() methods for spectral objects set a default mapping for x and y.
ggplot(sun.spct) +
geom_line() +
stat_wb_box(w.band = VIS()) +
stat_wb_contribution(w.band = VIS()) +
scale_fill_identity() + scale_color_identity()
ggplot(sun.spct) +
geom_line() +
stat_wb_box(w.band = VIS_bands()) +
stat_wb_contribution(w.band = VIS_bands(), angle = 90, size = 2.5) +
scale_fill_identity() + scale_color_identity()
ggplot(sun.spct) +
geom_line() +
stat_wb_box(w.band = VIS_bands()) +
stat_wb_contribution(w.band = VIS_bands(), angle = 90, size = 2.5,
label.mult = 100, label.fmt = "%3.0f%%") +
scale_fill_identity() + scale_color_identity()
# }
Run the code above in your browser using DataCamp Workspace