-4

I need to know how to create a simple Venn diagram in rstudio. I have the following data: A=25, B=19, A&B=7

I have no idea wear to start.

freeazabird
  • 347
  • 2
  • 11

1 Answers1

0
library(VennDiagram)
venn_plot <- draw.pairwise.venn(area1=25,
                                area2=19,
                                cross.area=7,
                                category=c('A', 'B'),
                                scaled=FALSE)

Source: http://www.di.fc.ul.pt/~jpn/r/GraphicalTools/Venn.html

Image of Venn diagram

Stewart Macdonald
  • 2,062
  • 24
  • 27
  • Thank you! Is there a way to add a third data circle 'C', with this code? Or is the max number of circles two? – freeazabird Jun 13 '19 at 02:34
  • Have a look at the `draw.triple.venn` function in the `VennDiagram` library. – Stewart Macdonald Jun 13 '19 at 03:09
  • Thanks. I have been playing around with draw.triple.venn and draw.quad.venn. I've created a graph to my liking. The one thing I need to change is the font of the labels to arial. Any idea how I would go about doing this? – freeazabird Jun 13 '19 at 05:09