VennDiagram without group names and with Arial font

烂漫一生 提交于 2019-12-07 11:27:09

问题


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)

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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/38072203/venndiagram-without-group-names-and-with-arial-font

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!