facet x axis

50 views
Skip to first unread message

IRich

unread,
Apr 23, 2015, 10:55:13 AM4/23/15
to ggp...@googlegroups.com
Hi,
I have a following barplot

otu_bar <-    ggplot(data=otu40, aes(x=taxa, y=relab, fill=color1)) + geom_bar(stat="identity") + facet_grid(. ~ no) +
              theme(legend.position="none") +
              coord_flip() + ylim(0, 0.3) + theme(panel.border = element_rect(colour = "black", fill=NA, size=1)) +
              theme(panel.grid.major.x = element_blank()) +ylab("relative Abundance %") + theme(axis.title.y = element_blank())
                          
otu_bar 


What I would like to do is subsetting the x-axis (taxa) in groups. I figured, I could do it by faceting like facet_grid(group ~ no, spaces="free_x"),
but what I want eventually is only one x-axis left, not multiple. This approach did not work the way I thought.

I added the text file.
Thanks in advance!

Inga
for_google_group.txt

IRich

unread,
Apr 27, 2015, 10:22:31 AM4/27/15
to ggp...@googlegroups.com
HI again, is there already a solution somewhere, I didn't see?

/Inga

Brandon Hurr

unread,
Apr 27, 2015, 1:42:38 PM4/27/15
to IRich, ggplot2
Inga,

Maybe something like this? Needs cleaning, but I think it's what you
are looking for.

ggplot(data=otu40, aes(x=as.factor(taxa), y=relab, fill=color1)) +
geom_bar(stat="identity") +
facet_grid(no ~ group, scales = "free_x", drop=TRUE) +
theme(legend.position="none") +
ylim(0, 0.3) +
theme(panel.border = element_rect(colour = "black", fill=NA, size=1)) +
theme(panel.grid.major.x = element_blank()) +ylab("relative Abundance %") +
theme(axis.title.y = element_blank())

The biggest issue I have with this is the width of the bars varies.
Fat bars draw your eye when thinner bars might actually give you
better comparisons. I think there is a way to fix the column width,
but let's make sure I've not misunderstood your requirements.

Brandon
> --
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
> https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ggplot2+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

IRich

unread,
Apr 28, 2015, 8:45:17 AM4/28/15
to ggp...@googlegroups.com
Thank you Brandon! 

It still doesn't work as I would like to have it. For each facet of group, I only want only the taxa included in the x-axis, which are assigned to that group. Now it still repeats all taxa for each group.

/Inga


Brandon Hurr

unread,
Apr 28, 2015, 9:01:54 AM4/28/15
to IRich, ggplot2
Inga,

It only plots what it has data of for that group. It doesn't repeat
everything every time. See attached.

otu40<-structure(list(no = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L,
18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L,
18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L,
18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L), taxa =
c("Clostridia;Clostridiales;Peptococcaceae",
"Clostridia;Clostridiales;Ruminococcaceae",
"Chloroflexi;Anaerolineae;Anaerolineales;Anaerolineaceae",
"Proteobacteria;Betaproteobacteria;Burkholderiales;Comamonadaceae",
"Proteobacteria;Betaproteobacteria;Rhodocyclales;Rhodocyclaceae",
"Proteobacteria;Betaproteobacteria;Nitrosomonadales;Nitrosomonadaceae",
"Proteobacteria;Betaproteobacteria;Hydrogenophilales;Hydrogenophilaceae",
"Proteobacteria;Betaproteobacteria;Methylophilales;Methylophilaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Methylococcaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Crenotrichaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Xanthomonadaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Sinobacteraceae",
"Proteobacteria;Gammaproteobacteria;PYR10d3;f",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Shewanellaceae",
"Proteobacteria;Gammaproteobacteria;Pseudomonadales;Pseudomonadaceae",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Alteromonadaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Sphingomonadaceae",
"Proteobacteria;Alphaproteobacteria;Rhodobacterales;Rhodobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Erythrobacteraceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;GOBB3-C201",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Acetobacteraceae",
"Proteobacteria;Alphaproteobacteria;DB1-14;f",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Methylobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Ellin6055",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Hyphomicrobiaceae",
"Proteobacteria;Alphaproteobacteria;Caulobacterales;Caulobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Phyllobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Xanthobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Bradyrhizobiaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Rhizobiaceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Helicobacteraceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Campylobacteraceae",
"Cyanobacteria;Chloroplast;Chloroplast;Chloroplast",
"Actinobacteria;Actinobacteria;Propionibacteriales;Nocardioidaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Micrococcaceae",
"Actinobacteria;Coriobacteriia;Coriobacteriales;Coriobacteriaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Microbacteriaceae",
"Actinobacteria;Actinobacteria;Frankiales;Geodermatophilaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Intrasporangiaceae",
"Actinobacteria;Acidimicrobiia;Acidimicrobiales;Acidimicrobiaceae",
"Bacteroidetes;Cytophagia;Cytophagales;Cytophagaceae",
"Bacteroidetes;Sphingobacteriia;Sphingobacteriales;Chitinophagaceae",
"Bacteroidetes;Flavobacteria;Flavobacteriales;Flavobacteriaceae",
"Bacteroidetes;Bacteroidia;Bacteroidales;Porphyromonadaceae",
"Clostridia;Clostridiales;Peptococcaceae",
"Clostridia;Clostridiales;Ruminococcaceae",
"Chloroflexi;Anaerolineae;Anaerolineales;Anaerolineaceae",
"Proteobacteria;Betaproteobacteria;Burkholderiales;Comamonadaceae",
"Proteobacteria;Betaproteobacteria;Rhodocyclales;Rhodocyclaceae",
"Proteobacteria;Betaproteobacteria;Nitrosomonadales;Nitrosomonadaceae",
"Proteobacteria;Betaproteobacteria;Hydrogenophilales;Hydrogenophilaceae",
"Proteobacteria;Betaproteobacteria;Methylophilales;Methylophilaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Methylococcaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Crenotrichaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Xanthomonadaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Sinobacteraceae",
"Proteobacteria;Gammaproteobacteria;PYR10d3;f",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Shewanellaceae",
"Proteobacteria;Gammaproteobacteria;Pseudomonadales;Pseudomonadaceae",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Alteromonadaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Sphingomonadaceae",
"Proteobacteria;Alphaproteobacteria;Rhodobacterales;Rhodobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Erythrobacteraceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;GOBB3-C201",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Acetobacteraceae",
"Proteobacteria;Alphaproteobacteria;DB1-14;f",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Methylobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Ellin6055",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Hyphomicrobiaceae",
"Proteobacteria;Alphaproteobacteria;Caulobacterales;Caulobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Phyllobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Xanthobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Bradyrhizobiaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Rhizobiaceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Helicobacteraceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Campylobacteraceae",
"Cyanobacteria;Chloroplast;Chloroplast;Chloroplast",
"Actinobacteria;Actinobacteria;Propionibacteriales;Nocardioidaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Micrococcaceae",
"Actinobacteria;Coriobacteriia;Coriobacteriales;Coriobacteriaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Microbacteriaceae",
"Actinobacteria;Actinobacteria;Frankiales;Geodermatophilaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Intrasporangiaceae",
"Actinobacteria;Acidimicrobiia;Acidimicrobiales;Acidimicrobiaceae",
"Bacteroidetes;Cytophagia;Cytophagales;Cytophagaceae",
"Bacteroidetes;Sphingobacteriia;Sphingobacteriales;Chitinophagaceae",
"Bacteroidetes;Flavobacteria;Flavobacteriales;Flavobacteriaceae",
"Bacteroidetes;Bacteroidia;Bacteroidales;Porphyromonadaceae",
"Clostridia;Clostridiales;Peptococcaceae",
"Clostridia;Clostridiales;Ruminococcaceae",
"Chloroflexi;Anaerolineae;Anaerolineales;Anaerolineaceae",
"Proteobacteria;Betaproteobacteria;Burkholderiales;Comamonadaceae",
"Proteobacteria;Betaproteobacteria;Rhodocyclales;Rhodocyclaceae",
"Proteobacteria;Betaproteobacteria;Nitrosomonadales;Nitrosomonadaceae",
"Proteobacteria;Betaproteobacteria;Hydrogenophilales;Hydrogenophilaceae",
"Proteobacteria;Betaproteobacteria;Methylophilales;Methylophilaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Methylococcaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Crenotrichaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Xanthomonadaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Sinobacteraceae",
"Proteobacteria;Gammaproteobacteria;PYR10d3;f",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Shewanellaceae",
"Proteobacteria;Gammaproteobacteria;Pseudomonadales;Pseudomonadaceae",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Alteromonadaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Sphingomonadaceae",
"Proteobacteria;Alphaproteobacteria;Rhodobacterales;Rhodobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Erythrobacteraceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;GOBB3-C201",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Acetobacteraceae",
"Proteobacteria;Alphaproteobacteria;DB1-14;f",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Methylobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Ellin6055",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Hyphomicrobiaceae",
"Proteobacteria;Alphaproteobacteria;Caulobacterales;Caulobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Phyllobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Xanthobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Bradyrhizobiaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Rhizobiaceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Helicobacteraceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Campylobacteraceae",
"Cyanobacteria;Chloroplast;Chloroplast;Chloroplast",
"Actinobacteria;Actinobacteria;Propionibacteriales;Nocardioidaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Micrococcaceae",
"Actinobacteria;Coriobacteriia;Coriobacteriales;Coriobacteriaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Microbacteriaceae",
"Actinobacteria;Actinobacteria;Frankiales;Geodermatophilaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Intrasporangiaceae",
"Actinobacteria;Acidimicrobiia;Acidimicrobiales;Acidimicrobiaceae",
"Bacteroidetes;Cytophagia;Cytophagales;Cytophagaceae",
"Bacteroidetes;Sphingobacteriia;Sphingobacteriales;Chitinophagaceae",
"Bacteroidetes;Flavobacteria;Flavobacteriales;Flavobacteriaceae",
"Bacteroidetes;Bacteroidia;Bacteroidales;Porphyromonadaceae",
"Clostridia;Clostridiales;Peptococcaceae",
"Clostridia;Clostridiales;Ruminococcaceae",
"Chloroflexi;Anaerolineae;Anaerolineales;Anaerolineaceae",
"Proteobacteria;Betaproteobacteria;Burkholderiales;Comamonadaceae",
"Proteobacteria;Betaproteobacteria;Rhodocyclales;Rhodocyclaceae",
"Proteobacteria;Betaproteobacteria;Nitrosomonadales;Nitrosomonadaceae",
"Proteobacteria;Betaproteobacteria;Hydrogenophilales;Hydrogenophilaceae",
"Proteobacteria;Betaproteobacteria;Methylophilales;Methylophilaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Methylococcaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Crenotrichaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Xanthomonadaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Sinobacteraceae",
"Proteobacteria;Gammaproteobacteria;PYR10d3;f",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Shewanellaceae",
"Proteobacteria;Gammaproteobacteria;Pseudomonadales;Pseudomonadaceae",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Alteromonadaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Sphingomonadaceae",
"Proteobacteria;Alphaproteobacteria;Rhodobacterales;Rhodobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Erythrobacteraceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;GOBB3-C201",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Acetobacteraceae",
"Proteobacteria;Alphaproteobacteria;DB1-14;f",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Methylobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Ellin6055",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Hyphomicrobiaceae",
"Proteobacteria;Alphaproteobacteria;Caulobacterales;Caulobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Phyllobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Xanthobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Bradyrhizobiaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Rhizobiaceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Helicobacteraceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Campylobacteraceae",
"Cyanobacteria;Chloroplast;Chloroplast;Chloroplast",
"Actinobacteria;Actinobacteria;Propionibacteriales;Nocardioidaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Micrococcaceae",
"Actinobacteria;Coriobacteriia;Coriobacteriales;Coriobacteriaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Microbacteriaceae",
"Actinobacteria;Actinobacteria;Frankiales;Geodermatophilaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Intrasporangiaceae",
"Actinobacteria;Acidimicrobiia;Acidimicrobiales;Acidimicrobiaceae",
"Bacteroidetes;Cytophagia;Cytophagales;Cytophagaceae",
"Bacteroidetes;Sphingobacteriia;Sphingobacteriales;Chitinophagaceae",
"Bacteroidetes;Flavobacteria;Flavobacteriales;Flavobacteriaceae",
"Bacteroidetes;Bacteroidia;Bacteroidales;Porphyromonadaceae",
"Clostridia;Clostridiales;Peptococcaceae",
"Clostridia;Clostridiales;Ruminococcaceae",
"Chloroflexi;Anaerolineae;Anaerolineales;Anaerolineaceae",
"Proteobacteria;Betaproteobacteria;Burkholderiales;Comamonadaceae",
"Proteobacteria;Betaproteobacteria;Rhodocyclales;Rhodocyclaceae",
"Proteobacteria;Betaproteobacteria;Nitrosomonadales;Nitrosomonadaceae",
"Proteobacteria;Betaproteobacteria;Hydrogenophilales;Hydrogenophilaceae",
"Proteobacteria;Betaproteobacteria;Methylophilales;Methylophilaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Methylococcaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Crenotrichaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Xanthomonadaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Sinobacteraceae",
"Proteobacteria;Gammaproteobacteria;PYR10d3;f",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Shewanellaceae",
"Proteobacteria;Gammaproteobacteria;Pseudomonadales;Pseudomonadaceae",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Alteromonadaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Sphingomonadaceae",
"Proteobacteria;Alphaproteobacteria;Rhodobacterales;Rhodobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Erythrobacteraceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;GOBB3-C201",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Acetobacteraceae",
"Proteobacteria;Alphaproteobacteria;DB1-14;f",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Methylobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Ellin6055",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Hyphomicrobiaceae",
"Proteobacteria;Alphaproteobacteria;Caulobacterales;Caulobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Phyllobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Xanthobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Bradyrhizobiaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Rhizobiaceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Helicobacteraceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Campylobacteraceae",
"Cyanobacteria;Chloroplast;Chloroplast;Chloroplast",
"Actinobacteria;Actinobacteria;Propionibacteriales;Nocardioidaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Micrococcaceae",
"Actinobacteria;Coriobacteriia;Coriobacteriales;Coriobacteriaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Microbacteriaceae",
"Actinobacteria;Actinobacteria;Frankiales;Geodermatophilaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Intrasporangiaceae",
"Actinobacteria;Acidimicrobiia;Acidimicrobiales;Acidimicrobiaceae",
"Bacteroidetes;Cytophagia;Cytophagales;Cytophagaceae",
"Bacteroidetes;Sphingobacteriia;Sphingobacteriales;Chitinophagaceae",
"Bacteroidetes;Flavobacteria;Flavobacteriales;Flavobacteriaceae",
"Bacteroidetes;Bacteroidia;Bacteroidales;Porphyromonadaceae",
"Clostridia;Clostridiales;Peptococcaceae",
"Clostridia;Clostridiales;Ruminococcaceae",
"Chloroflexi;Anaerolineae;Anaerolineales;Anaerolineaceae",
"Proteobacteria;Betaproteobacteria;Burkholderiales;Comamonadaceae",
"Proteobacteria;Betaproteobacteria;Rhodocyclales;Rhodocyclaceae",
"Proteobacteria;Betaproteobacteria;Nitrosomonadales;Nitrosomonadaceae",
"Proteobacteria;Betaproteobacteria;Hydrogenophilales;Hydrogenophilaceae",
"Proteobacteria;Betaproteobacteria;Methylophilales;Methylophilaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Methylococcaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Crenotrichaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Xanthomonadaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Sinobacteraceae",
"Proteobacteria;Gammaproteobacteria;PYR10d3;f",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Shewanellaceae",
"Proteobacteria;Gammaproteobacteria;Pseudomonadales;Pseudomonadaceae",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Alteromonadaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Sphingomonadaceae",
"Proteobacteria;Alphaproteobacteria;Rhodobacterales;Rhodobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Erythrobacteraceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;GOBB3-C201",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Acetobacteraceae",
"Proteobacteria;Alphaproteobacteria;DB1-14;f",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Methylobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Ellin6055",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Hyphomicrobiaceae",
"Proteobacteria;Alphaproteobacteria;Caulobacterales;Caulobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Phyllobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Xanthobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Bradyrhizobiaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Rhizobiaceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Helicobacteraceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Campylobacteraceae",
"Cyanobacteria;Chloroplast;Chloroplast;Chloroplast",
"Actinobacteria;Actinobacteria;Propionibacteriales;Nocardioidaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Micrococcaceae",
"Actinobacteria;Coriobacteriia;Coriobacteriales;Coriobacteriaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Microbacteriaceae",
"Actinobacteria;Actinobacteria;Frankiales;Geodermatophilaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Intrasporangiaceae",
"Actinobacteria;Acidimicrobiia;Acidimicrobiales;Acidimicrobiaceae",
"Bacteroidetes;Cytophagia;Cytophagales;Cytophagaceae",
"Bacteroidetes;Sphingobacteriia;Sphingobacteriales;Chitinophagaceae",
"Bacteroidetes;Flavobacteria;Flavobacteriales;Flavobacteriaceae",
"Bacteroidetes;Bacteroidia;Bacteroidales;Porphyromonadaceae",
"Clostridia;Clostridiales;Peptococcaceae",
"Clostridia;Clostridiales;Ruminococcaceae",
"Chloroflexi;Anaerolineae;Anaerolineales;Anaerolineaceae",
"Proteobacteria;Betaproteobacteria;Burkholderiales;Comamonadaceae",
"Proteobacteria;Betaproteobacteria;Rhodocyclales;Rhodocyclaceae",
"Proteobacteria;Betaproteobacteria;Nitrosomonadales;Nitrosomonadaceae",
"Proteobacteria;Betaproteobacteria;Hydrogenophilales;Hydrogenophilaceae",
"Proteobacteria;Betaproteobacteria;Methylophilales;Methylophilaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Methylococcaceae",
"Proteobacteria;Gammaproteobacteria;Methylococcales;Crenotrichaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Xanthomonadaceae",
"Proteobacteria;Gammaproteobacteria;Xanthomonadales;Sinobacteraceae",
"Proteobacteria;Gammaproteobacteria;PYR10d3;f",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Shewanellaceae",
"Proteobacteria;Gammaproteobacteria;Pseudomonadales;Pseudomonadaceae",
"Proteobacteria;Gammaproteobacteria;Alteromonadales;Alteromonadaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Sphingomonadaceae",
"Proteobacteria;Alphaproteobacteria;Rhodobacterales;Rhodobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Erythrobacteraceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;GOBB3-C201",
"Proteobacteria;Alphaproteobacteria;Rhodospirillales;Acetobacteraceae",
"Proteobacteria;Alphaproteobacteria;DB1-14;f",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Methylobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Sphingomonadales;Ellin6055",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Hyphomicrobiaceae",
"Proteobacteria;Alphaproteobacteria;Caulobacterales;Caulobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Phyllobacteriaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Xanthobacteraceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Bradyrhizobiaceae",
"Proteobacteria;Alphaproteobacteria;Rhizobiales;Rhizobiaceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Helicobacteraceae",
"Proteobacteria;Epsilonproteobacteria;Campylobacterales;Campylobacteraceae",
"Cyanobacteria;Chloroplast;Chloroplast;Chloroplast",
"Actinobacteria;Actinobacteria;Propionibacteriales;Nocardioidaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Micrococcaceae",
"Actinobacteria;Coriobacteriia;Coriobacteriales;Coriobacteriaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Microbacteriaceae",
"Actinobacteria;Actinobacteria;Frankiales;Geodermatophilaceae",
"Actinobacteria;Actinobacteria;Micrococcales;Intrasporangiaceae",
"Actinobacteria;Acidimicrobiia;Acidimicrobiales;Acidimicrobiaceae",
"Bacteroidetes;Cytophagia;Cytophagales;Cytophagaceae",
"Bacteroidetes;Sphingobacteriia;Sphingobacteriales;Chitinophagaceae",
"Bacteroidetes;Flavobacteria;Flavobacteriales;Flavobacteriaceae",
"Bacteroidetes;Bacteroidia;Bacteroidales;Porphyromonadaceae"),
relab = c(0.00014573, 8.33e-05, 0.005121372, 0.024149561,
8.33e-05, 0.005392014, 0.000499646, 2.08e-05, 0.000520465,
0.000166549, 0.004288629, 0.005350377, 0, 0.002102677, 0.001124204,
8.33e-05, 0.246512887, 0.020069118, 0.028667194, 0.020277304,
0.003455885, 0.024295291, 0.002040222, 0.019090644, 0.019340467,
0.005287921, 0.008514802, 0.003455885, 0.001103385, 0.004767456,
0.000853562, 0, 0, 0.085606029, 0.103197735, 0.029624849,
0, 0.000978474, 0.014239913, 0.011013032, 0.003122788, 0.028854561,
0.043781488, 0.003601616, 0, 0.004936019, 0.000582648, 0.089540917,
0.166604371, 0.114935579, 0.016863814, 0.007849259, 0.017215602,
0.117420078, 0.101831494, 0.003034167, 0.006727936, 0.002066752,
0.000780529, 7.7e-05, 0.001627017, 0.00278132, 0.002319599,
0.001143309, 0.000351788, 0, 0.001220263, 0.003352975, 0,
7.7e-05, 0.000692582, 0.000615628, 0.000351788, 0.000395761,
0.000890462, 0.003089134, 0.00019788, 0, 3.3e-05, 0.000692582,
0.001044369, 0.005045952, 0.000934436, 4.4e-05, 0.000186887,
0.000384768, 0.000186887, 0.006035355, 0.002451519, 0.000307814,
0.203506731, 0.010096394, 0.156514875, 0.014666777, 0.004487286,
0.001454213, 0.000997175, 0.000872528, 0.014001994, 0.001994349,
0.00236829, 0.001288017, 0.000207745, 0.005692205, 0.000166196,
0.001121822, 0.001620409, 0.000249294, 0.000124647, 0, 0.000249294,
4.15e-05, 0, 8.31e-05, 0.000457038, 0.000290843, 0, 0.000249294,
0.000124647, 0.000332392, 8.31e-05, 0.00473658, 0.000124647,
4.15e-05, 0.000249294, 0.000332392, 0.007852751, 0.000623234,
0, 0.000166196, 0.000166196, 4.15e-05, 0.001994349, 0.00236829,
0.01063653, 0.001022204, 0.002489796, 0.030322943, 0.122481911,
0.019728532, 0.012799451, 0.000321264, 0.001058711, 0.017019692,
0.015566702, 0.034433663, 0.033572091, 0.00125585, 0.001212042,
0.011309954, 0.000744748, 0.064019159, 0.028431866, 0.00516943,
0.019210129, 0.032703218, 0.004804358, 0.004300557, 0.002592017,
0.001124424, 0.01294548, 0.0055199, 0.011266145, 0.005300856,
0.003125023, 0.002533605, 0.00010222, 0.000292058, 0.006761147,
0.009075709, 0.005665929, 0.000386977, 0.004935784, 0.002920582,
0.00075205, 0.004176432, 0.015866062, 0.023364657, 0.045298228,
0.008243343, 0.066751499, 0.005025234, 0.040072467, 0.070202303,
0.058426433, 0.000280378, 0.000625458, 0.000301945, 0.010913169,
0.001552862, 0.044817323, 0.021330285, 0.000539188, 0.004119398,
0.002221455, 0.001768537, 0.076154941, 0.005650692, 0.005219342,
0.000668593, 0.000215675, 0.005887935, 0.016801104, 0.000150973,
2.16e-05, 0.000452918, 0.004701721, 0.000194108, 0.006125178,
0.002523401, 0.002868481, 0.000668593, 0.000215675, 0.000107838,
0.000301945, 2.16e-05, 0.001337187, 0.008907389, 0, 6.47e-05,
0, 0.142086874, 0.034788423, 0.049605314, 0.016995212, 0.180188955,
0.022791468, 0.140255187, 0.009837343, 0.00165579, 0.001266193,
0.014804714, 0.000194799, 0.000584397, 0, 0.000779195, 0.005746567,
0.001460992, 0.012661927, 0.000973994, 0.001558391, 0.002337586,
0.002240187, 0.000973994, 0.000876595, 0, 0, 0, 0, 0, 0.000779195,
0, 0, 0.000292198, 0, 0, 0.006720561, 0.000194799, 0.001363592,
0.00175319, 0, 0.01042174, 0.001947989, 0, 0, 9.74e-05, 0.000681796,
0.000389598, 0.00175319, 0.005259569, 0.230838204, 0.031100558,
0.074638018, 0.022848034, 0.00202577, 0.000182651, 0.001378188,
0.001129118, 0.007256243, 0.002789586, 0.002457492, 0.000714001,
0.030436371, 4.98e-05, 0.000348698, 0.001046095, 0.000282279,
4.98e-05, 0.00049814, 0.000149442, 1.66e-05, 0, 0.000132837,
1.66e-05, 4.98e-05, 8.3e-05, 4.98e-05, 1.66e-05, 0.000116233,
0.000132837, 1.66e-05, 0.011025505, 0.001245351, 1.66e-05,
0.000282279, 1.66e-05, 0.001693677, 0.000614373, 0, 0, 0,
0.00127856, 0.000348698, 0.000547954, 0.056090595), color1 = c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L),
group = c("Firmicutes", "Firmicutes", "Chloroflexi", "Betaproteobacteria",
"Betaproteobacteria", "Betaproteobacteria", "Betaproteobacteria",
"Betaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Epsilonproteobacteria", "Epsilonproteobacteria", "Cyanobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Bacteroidetes",
"Bacteroidetes", "Bacteroidetes", "Bacteroidetes", "Firmicutes",
"Firmicutes", "Chloroflexi", "Betaproteobacteria", "Betaproteobacteria",
"Betaproteobacteria", "Betaproteobacteria", "Betaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Epsilonproteobacteria",
"Epsilonproteobacteria", "Cyanobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Bacteroidetes", "Bacteroidetes",
"Bacteroidetes", "Bacteroidetes", "Firmicutes", "Firmicutes",
"Chloroflexi", "Betaproteobacteria", "Betaproteobacteria",
"Betaproteobacteria", "Betaproteobacteria", "Betaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Epsilonproteobacteria",
"Epsilonproteobacteria", "Cyanobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Bacteroidetes", "Bacteroidetes",
"Bacteroidetes", "Bacteroidetes", "Firmicutes", "Firmicutes",
"Chloroflexi", "Betaproteobacteria", "Betaproteobacteria",
"Betaproteobacteria", "Betaproteobacteria", "Betaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Epsilonproteobacteria",
"Epsilonproteobacteria", "Cyanobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Bacteroidetes", "Bacteroidetes",
"Bacteroidetes", "Bacteroidetes", "Firmicutes", "Firmicutes",
"Chloroflexi", "Betaproteobacteria", "Betaproteobacteria",
"Betaproteobacteria", "Betaproteobacteria", "Betaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Epsilonproteobacteria",
"Epsilonproteobacteria", "Cyanobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Bacteroidetes", "Bacteroidetes",
"Bacteroidetes", "Bacteroidetes", "Firmicutes", "Firmicutes",
"Chloroflexi", "Betaproteobacteria", "Betaproteobacteria",
"Betaproteobacteria", "Betaproteobacteria", "Betaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Epsilonproteobacteria",
"Epsilonproteobacteria", "Cyanobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Bacteroidetes", "Bacteroidetes",
"Bacteroidetes", "Bacteroidetes", "Firmicutes", "Firmicutes",
"Chloroflexi", "Betaproteobacteria", "Betaproteobacteria",
"Betaproteobacteria", "Betaproteobacteria", "Betaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Gammaproteobacteria",
"Gammaproteobacteria", "Gammaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Alphaproteobacteria",
"Alphaproteobacteria", "Alphaproteobacteria", "Epsilonproteobacteria",
"Epsilonproteobacteria", "Cyanobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Actinobacteria", "Actinobacteria",
"Actinobacteria", "Actinobacteria", "Bacteroidetes", "Bacteroidetes",
"Bacteroidetes", "Bacteroidetes")), .Names = c("no", "taxa",
"relab", "color1", "group"), class = "data.frame", row.names = c(NA,
-315L))

library(ggplot2)
ggplot(data=otu40, aes(x=as.factor(taxa), y=relab, fill=color1)) +
geom_bar(stat="identity") +
facet_grid(no ~ group, scales = "free_x", drop=TRUE) +
theme(legend.position="none") +
ylim(0, 0.3) +
theme(panel.border = element_rect(colour = "black", fill=NA, size=1)) +
theme(panel.grid.major.x = element_blank()) +ylab("relative Abundance %") +
theme(axis.title.y = element_blank()) + theme(axis.text.x =
element_text(angle = 90))
question.png

IRich

unread,
Apr 28, 2015, 11:09:05 AM4/28/15
to ggp...@googlegroups.com
sorry, I could reproduce it now. but great! 


Am Donnerstag, 23. April 2015 16:55:13 UTC+2 schrieb IRich:

IRich

unread,
Apr 30, 2015, 7:36:44 AM4/30/15
to ggp...@googlegroups.com
I also found a solution for a similar bar width:

facet_grid(no ~ group, scales = "free_x", space = "free_x", drop=TRUE)


but now coord_flip() doesn't seem to work straight forward anymore.

/Inga

Brandon Hurr

unread,
Apr 30, 2015, 10:39:24 AM4/30/15
to IRich, ggplot2
Inga, 

What I've done before when coord_flip wasn't cooperating was to use theme() to rotate labels of the axes. Then you produce the image on its side and rotate it. It's sloppy, but works. 

Does that make sense? 

Brandon

Reply all
Reply to author
Forward
0 new messages