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

Enlarged/zoomed in plot while using plot_bar function! #1491

Open bhagesh-h opened 3 years ago

bhagesh-h commented 3 years ago

Hi, below is the complete code I used to plot OTU abundance

library("phyloseq") library("ggplot2") otu <- read.csv("dfAbundance_16S.csv", sep=",", row.names=1) tax <- read.csv("dfClassification_16S.csv", sep=",", row.names=1) OTU = otu_table(as.matrix(otu), taxa_are_rows = TRUE) TAX = tax_table(as.matrix(tax)) physeq = phyloseq(OTU, TAX) plot_bar(physeq, fill = "Genus")

which gives me this plot:

image

please let me know if there's a fix for this to view the complete image.

Thank you.

ycl6 commented 3 years ago

There are a few things you can try, such as output to a file (png, pdf, etc) and change the width/height/resolution of the output file, or consider using family or class instead. With that many genera, it is impossible for readers to differentiate one genus from another anyway.