1

I am making a Venn-diagram in R. I have two methods and different taxa found in each method. I want to list the families found in a venn diagram to show: taxa found in method A, taxa found in method B and the overlap between the two. Right now, my families are listed but not within the bounds of the venn diagram.

enter image description here

What I tried:

# mydata
MethodA <- list("Achiropsettidae",
"Acipenseridae",
"Acropomatidae",
"Adrianichthyidae",
"Agonidae",
"Akysidae",
"Albulidae",
"Alepisauridae",
"Alepocephalidae",
"Alestiidae",
"Alopiidae",
"Amarsipidae",
"Ambassidae",
"Amblycipitidae",
"Amblyopsidae",
"Amiidae",
"Ammodytidae",
"Amphiliidae",
"An-Ap",
"Anabantidae",
"Anablepidae",
"Anacanthobatidae",
"Anarhichadidae",
"Anguillidae",
"Anomalopidae",
"Anoplogastridae",
"Anoplopomatidae",
"Anostomidae",
"Anotopteridae",
"Antennariidae",
"Aphredoderidae",
"Aphyonidae",
"Apistidae",
"Aploactinidae",
"Aplocheilidae",
"Aplodactylidae",
"Apogonidae",
"Apteronotidae",
"Bagridae",
"Balistidae"
"Balitoridae",
"Banjosidae",
"Barbourisiidae",
"Bathyclupeidae",
"Bathydraconidae",
"Bathylagidae",
"Bathylutichthyidae",
"Bathymasteridae",
"Batrachoididae",
"Bedotiidae",
"Belonidae",
"Bembridae",
"Berycidae",
"Blenniidae")

MethodB <- list("Abyssocottidae",
            "Acanthuridae",
            "Acestrorhynchidae",
            "Achiridae","Aphredoderidae",
            "Aphyonidae",
            "Apistidae",
            "Aploactinidae",
            "Aplocheilidae",
            "Aplodactylidae",
            "Apogonidae",
            "Apteronotidae")




# Generate plot
v <- venn.diagram(list(MethodA=MethodA, MethodB=MethodB),
              fill = c("transparent", "blue"),
              alpha = c(0.5, 0.5), cat.cex = 1.5, cex=0.5,
              filename=NULL, main = "Family", main.cex = 1.5, lty=c(1,2),
              col=c("lightblue","navy"), sub = "Year: 2000", ext.percent=0, euler.d=TRUE, scaled=TRUE)


# have a look at the default plot
grid.newpage()
grid.draw(v)

# Assign labels for unique regions
v[[5]]$label <- paste(setdiff(MethodA, MethodB), collapse="\n")

v[[6]]$label <- paste(setdiff(MethodB, MethodA), collapse="\n")

# Assign labels for overlapping region
v[[7]]$label <- paste(intersect(MethodA, MethodB), collapse="\n")


# plot  
grid.newpage()
grid.draw(v)

What I Want:

I mainly want the Phylum venn diagram (with my family names) but I would love the set of diagrams too if I have the option to view them all and view one at a time.

enter image description here

0

Browse other questions tagged or ask your own question.