freeazabird
freeazabird

Reputation: 401

How to remove Venn Diagram Border Box?

I need to remove the border from my venn diagram. The typical bty='n' doesn't appear to work with the venn package. Any ideas on how to remove it? Here's what the diagram currently looks like https://ibb.co/nb06nF7

 #install packages
 install.packages("readxl"); install.packages("venn")

 #Load packages
 library(readxl); library(venn)

 #Read the .xlsx data
 data <- read_excel("~/Desktop/venn2.xlsx")

 #Make the data a data.frame
 data <- data.frame(venn)

  #Making the Venn diagram (cexil option changes the size of numbers, 
  cexsn option changes the size of labels)
  venn(data, ilab=FALSE, zcolor = 'style', opacity = 0.3, cexil = 0.8, 
  cexsn = 1, frame=F)

I want the venn to have the border box removed.

Upvotes: 1

Views: 967

Answers (1)

dww
dww

Reputation: 31452

The outer box is actually an integral part of a Venn diagram (it represents the universal set). So that's why the package does not offer an option to omit it. If you want to remove it, a dirty hack could be to overwrite it wiith another box in the background color.

venn(6, zcolor = 'style', opacity = 0.3, cexil = 0.8, cexsn = 1, frame=F)
zeroset <- matrix(1000*c(0,1,1,0,0,0,0,1,1,0), ncol = 2)
lines(zeroset, col='white', lwd=5)

enter image description here

Upvotes: 1

Related Questions