Plot environmental filtering responses (sanity check)
Source:R/plot_filtering.R
plot_filtering_response.RdA teaching/method-testing helper that visualises whether a gradient-responsive species shows higher abundance in quadrats whose environments are near the configured optimum (with tolerance band).
This plot is designed to pair with audit_environmental_filtering(). It is
intentionally simple: it uses per-quadrat mean environments (as computed by
calculate_quadrat_environment()) and the site x species abundance matrix.
Arguments
- res
A
spesim_resultlist returned byspesim_run().- species
Species labels to plot. Default
"all"uses all gradient-responsive species inres$P$GRADIENT.- add_smooth
Logical; add a loess smooth (teaching-friendly). Default
TRUE.