Closed lucygarner closed 1 year ago
Hi @lucygarner,
If you mean the order in which the sets are printed on the diagram, there is the "snames" argument in the main function venn().
Otherwise, more details are needed about your particular need.
Best, Adrian
If I understand the question correctly, it is already possible because the order is based on the input data:
set.seed(12345)
a <- list(first = sample(x = letters, size = 20, replace = FALSE),
second = sample(x = letters, size = 20, replace = FALSE),
third = sample(x = letters, size = 20, replace = FALSE))
venn(a,
zcolor = c(1,2,3),
box = FALSE,
ilcs = 2)
now if you define your order:
my_order <- c(2,3,1)
venn(a[my_order], #<-------------------------------------- specified order here
zcolor = c(1,2,3)[my_order], #<----------------------- and here
box = FALSE,
ilcs = 2)
using the sname
as @dusadrian suggested would change the order, but would keep the colors and other features in original (i.e provided) order:
venn(a,
zcolor = c(1,2,3),
box = FALSE,
snames = c("second", "third", "first"), #<------------ specified order here
ilcs = 2)
Ok great, thank you both. I will give this a go.
Hi,
Is it possible to specify the order of the sets in the Venn diagram?
Best wishes, Lucy