0

I am using nVennr, which has proved to be quite useful, although have been through all of the supporting documentation and still can't find out how to do 2 things that I am imagine are possible. They are how to change the displayed figures to non-standard-form format, and how to remove the legend.

Below is some data that illustrates how nVennr automatically converts figures to standard form.

library(nVennr)
library(dplyr)
library(rsvg)
library(grImport2)

SetA = round(runif(10000000),0)
SetB = round(runif(10000000),0)
SetC = round(runif(10000000),0)

allSets = cbind(SetA, SetB, SetC) %>% 
  as.data.frame() %>% 
  rownames_to_column()

SetA = subset(allSets, SetA == 1)$rowname
SetB = subset(allSets, SetB == 1)$rowname
SetC = subset(allSets, SetC == 1)$rowname

myV = plotVenn(list(SetA = SetA,
                SetB = SetB,
                SetC = SetC),
           nCycles = 10000)

Any help would be greatly appreciated, in particular with the standard form issue, and this renders the plots quite ugly.

Thanks!

1 Answers1

1

Glad you like the package. I am not sure what you mean by standard form. Perhaps you want one of those diagrams with three overlapping circles. In that case, I would recommend using other packages, like those suggested here. You can get a regular Venn diagram with nVennR, as shown in the vignette, but the default shape is always round in the region, not in the set:

library(nVennR)
myV3 <- createVennObj(nSets = 3, sSizes = c(rep(1, 8)))
myV3 <- plotVenn(nVennObj = myV3, labelRegions=F, showNumbers=F, opacity=0.2, borderWidth=4)

The result would be:

Regular Venn diagram

Regarding the legend, I did not think that would be necessary, as it is very easy to remove from the resulting svg file. However, since I need to upload a new version, I will add this function shortly.

EDIT: The new version of nVennR (0.2.2) has just been released. Now, plotVenn and showSVG have the option showLegend. If set to false, the legend is not shown.

vqf
  • 2,600
  • 10
  • 16
  • Hi, sorry for the very late response to this, although what I meant by 'standard form' was the standard index notation on the numerical labels, such as '1.234000E6' etc. For my particular use case I needed numerical labels in non-standard index notation format, and whatever I tried couldn't undo that (eg using scipen etc). Anyway, have yet to look at the new version of nVennR(0.2.2) although will do when I have a chance. – user10022403 Feb 23 '21 at 21:35