pl <- ggplot(data = SPE_ENV,
mapping = aes(x = Taxa,
y = Samples,
fill = OTU_Count)) +
geom_tile() +
scale_fill_gradient2(midpoint = 10000,
low = "blue",
mid = "white",
high = "red") +
theme_classic(base_size = 8) +
theme(legend.position = "bottom",
axis.text.x = element_text(angle = 45,
hjust = 1))
library("ggridges")
pl <- ggplot(data = SPE_ENV_targets,
mapping = aes(x = OTU_Count,
y = Taxa,
fill = Taxa)) +
geom_density_ridges(alpha = 0.5) +
scale_fill_viridis_d() +
labs(x = "OTU Count",
y = "Taxa Identified",
title = "OTU Count Distribution for 5 Taxa Stratified on Site",
caption = "Data from doi.org/10.1111/1751-7915.12334") +
theme_minimal(base_family = "Avenir",
base_size = 12) +
theme(legend.position = "bottom") +
facet_wrap(vars(site),
ncol = 2)
Let us take a look at a nice example…
R for Bio Data Science