Description Usage Arguments Value Examples
Plot abundance density across samples for a given taxon.
1 2 3 4 5 6 7 8 9 10 11 12  | 
x | 
 
  | 
variable | 
 OTU or metadata variable to visualize  | 
log10 | 
 Logical. Show log10 abundances or not.  | 
adjust | 
 see stat_density  | 
kernel | 
 see stat_density  | 
trim | 
 see stat_density  | 
na.rm | 
 see stat_density  | 
fill | 
 Fill color  | 
tipping.point | 
 Optional. Indicate critical point for abundance variations to be highlighted.  | 
xlim | 
 X axis limits  | 
A ggplot plot object.
1 2 3 4 5 6 7 8 9  | # Load gut microbiota data on 1006 western adults
# (see help(atlas1006) for references and details)
data(dietswap)
# Use compositional abundances instead of absolute signal
pseq.rel <- transform(dietswap, 'compositional')
# Population density for Dialister spp.; with log10 on the abundance (X)
# axis
library(ggplot2)
p <- plot_density(pseq.rel, variable='Dialister') + scale_x_log10()
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.