joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
584 stars 187 forks source link

Box plot outlier question #846

Closed ademenez closed 6 years ago

ademenez commented 6 years ago

Hi Joey,

I have plotted alpha diversity measures (OTUs observed and Chao1) using geom_boxplot within phyloseq, and I noticed that in many cases there are "dots" (which I believe are there to represent outliers) which are within and not beyond the whiskers. Shouldn't the outliers be plotted only when located beyond the whiskers?

This is the code I have used:

physeq_alpha <- prune_taxa(taxa_sums(physeq3) > 0, physeq3) sample_data(physeq_alpha)$site_treatments <- factor(sample_data(physeq_alpha)$site_treatments, levels = c("G_pre-exp", "G_Control", "G_L", "G_EW_L","G_cast","T_pre-exp", "T_Control", "T_L", "T_EW_L","T_cast"))

dd <- plot_richness(physeq_alpha, x = "site_treatments", measures=c("Chao1", "Observed")) + geom_boxplot()

image

I'd appreciate any feedback.

Cheers, Alex

joey711 commented 6 years ago

see the ggplot2::geom_boxplot documentation for details, options.