Here’s a short example for how to print labels directly on a ggplot chart.
Using my new psmr package that contains all my microbiome data and some useful convenience functions, I generate a dataframe with all gut samples during the period of a colon cleanse experiment.
I begin with some setup work. This code chunk loads the colon cleanse experiment data into the Phyloseq object cleanse.phylum.norm and then generates the dataframe c_df whose columns contain phylum-level abundance data for each date within the experiment period.
The chart itself is straightforward once the data is in the right format.
Notice the geom_text(): that’s where the labels themselves are generated. I arbitrarily chose a date "2015-10-01" to the left where the labels will fit.