Hello,
Even though the documentation says that it is possible to have a scaled Euler
diagram for three categories, this fails to happen. All of the circles are the
same size.
My commands are :
library(VennDiagram)
A <- 1:10
B <- 9:18
C <- 15:500
venn.diagram(list(NameOne=A, NameTwo=B, NameThree=C), "example.tiff",
euler.d = TRUE, scaled = TRUE, fill = c("red", "blue",
"green"), cat.pos = 0)
I also notice that adjusting just one text label with cat.just = list(c(-1, 0),
c(0, 0), c(0, 0)) actually moves all of them around. Why is that ?
Also, I have some real data I'm working on, where X, Y, Z are vectors of
numbers. It has an error with an unhelpful error message. Can it be fixed ?
> summary(X)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1 3706 8340 8488 13070 17560 > summary(Y)
Min. 1st Qu. Median Mean 3rd Qu. Max.
219 4740 9815 9394 13550 17560 > summary(Z)
Min. 1st Qu. Median Mean 3rd Qu. Max.
2184 4076 6266 5749 7940 8280 > venn.diagram(list(A = X, B = Y, C = Z),"crash.tiff")
Error in if (max.x - min.x >= max.y - min.y) { :
missing value where TRUE/FALSE needed
> traceback()
5: adjust.venn(grob.list, ...)
4: draw.sp.case(area.list = c(a1, a2, a3, 0, 0, 0, a7), enabled.areas = c(1,
2, 3, 7), area.x = c(a1.x.pos, a2.x.pos, a3.x.pos, 0, 0,
0, a7.x.pos), area.y = c(a1.y.pos, a2.y.pos, a3.y.pos, 0,
0, 0, a7.y.pos), attach.label.to = c(1, 3, 7), x.centres = c(x.centre.1,
x.centre.2, x.centre.3), y.centres = c(y.centre.1, y.centre.2,
y.centre.3), a.list = c(r1, r2, r3), b.list = c(r1, r2, r3),
straight.reverse = TRUE, reverse = reflection, category = category,
cat.default.pos = cat.default.pos, lwd = lwd, lty = lty,
col = col, label.col = label.col, cex = cex, fontface = fontface,
fontfamily = fontfamily, cat.pos = cat.pos, cat.dist = cat.dist,
cat.col = cat.col, cat.cex = cat.cex, cat.fontface = cat.fontface,
cat.fontfamily = cat.fontfamily, cat.just = cat.just, fill = fill,
alpha = alpha, ...)
3: draw.120(a1, a2, a3, a4, a5, a6, a7, category = category, reverse = reverse,
cat.default.pos = cat.default.pos, lwd = lwd, lty = lty,
col = col, label.col = label.col, cex = cex, fontface = fontface,
fontfamily = fontfamily, cat.pos = cat.pos, cat.dist = cat.dist,
cat.col = cat.col, cat.cex = cat.cex, cat.fontface = cat.fontface,
cat.fontfamily = cat.fontfamily, cat.just = cat.just, cat.prompts =
cat.prompts,
fill = fill, alpha = alpha, ...)
2: draw.triple.venn(length(a), length(b), length(c), length(nab),
length(nbc), length(nac), length(nabc), list.names, ind = FALSE,
list.order = 1:3, ...)
1: venn.diagram(list(A = X, B = Y, C = Z), "crash.tiff")
My setup is :
> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
LC_TIME=English_Australia.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] VennDiagram_1.0.0
--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia