These are the mean color spectra at the locality level for the two species (rolling means were used):
For clarity, each line in the figure above represents the meanEach color spectrum predicted for each location withrefers to a separate GAM of form density~s(wl) based on samples of ~10 flowersdifferent species. The gray areas represent 95% CI for each GAMEach line refers to a different locality.
My final goal is to model the (potentially interactive) effect of Taxon and wavelength wl on % reflectance (referred to as density in the code and dataset) while accounting for Locality as a random effect in a mixed-effect GAM. For the moment I won't add the mixed effect part to my plate, which is already full enough with trying to understand how to model interactions.

