Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VennDiagram without group names and with Arial font

I have been requested to redo the following Venn diagram in R with Arial font and without the group names... Looking at VennDiagram manual I do not see how I can do it...

This is my MWE:

#install.packages("VennDiagram")
library(VennDiagram)

a <- c(1,2,3,4,5,6)
b <- c(4,5,6,7,8,9,10,11,12)
c <- c(1,2,10,11,12,5,13,14,15,16)

venn.diagram(list("A" = a, "B" = b, "C" = c),
                 fill = c("red", "blue", "green"), alpha = c(0.5, 0.5, 0.5),
                 cat.cex = .75, cex = .75, lty =2, lwd =0.5, fontfamily ="serif",
                 filename = "test.tiff", imagetype = "tiff",
                 height = 3000, width = 3000, resolution = 1500, units = "px",
                 main="TITLE", main.pos=c(0.1,1.05), main.fontfamily="serif", main.cex=.75)

test image

Is it even possible to remove the group names A, B, and C, and change the font family to Arial, or I should think about another approach instead of R?

Besides, could it be possible to add a color legend?

like image 935
DaniCee Avatar asked Jun 28 '16 09:06

DaniCee


2 Answers

To install Arial fonts, use this manual. Then you should be able to change fontfamily ="Arial" and main.fontfamily="serif".

like image 115
J_F Avatar answered Nov 18 '22 18:11

J_F


Really rough guess, but do you see:

fontfamily ="serif",

and:

main.fontfamily="serif"

Try changing them to Arial and see if it works. I haven't got time to check this out at my computer right now so this is a super fast guess.

To remove the group names, you could probably change them where you assign them in the array:

venn.diagram(list("A" = a, "B" = b, "C" = c)

Here you can possibly call them what you'd like

like image 25
Jamie Belcher Avatar answered Nov 18 '22 19:11

Jamie Belcher