Closed miraquddus closed 2 years ago
Hi Adrian,
Thanks for your prompt guidance. When I applied the grid command, it draws a rounded rectangle on a separate frame. I am not sure how to incorporate in my existing code.
library('venn')
library('ggplot2')
library('grid')
grid.roundrect(width = 0.98, height = 0.98)
intersections <- c('~A~B~C', '~A~BC', '~AB~C', '~ABC', 'A~B~C', 'A~BC', 'AB~C', 'ABC')
venn(intersections, zcolor = c("black","white","white","white", "white","grey100","white","blue"), sncs = .85, ilabels = TRUE, box = FALSE)
The grid.roundrect()
command should be typed last. First draw the Venn diagram, and only after draw the rounded corners rectangle:
intersections <- c('~A~B~C', '~A~BC', '~AB~C', '~ABC', 'A~B~C', 'A~BC', 'AB~C', 'ABC')
venn(intersections, zcolor = c("black","white","white","white", "white","grey100","white","blue"), sncs = .85, ilabels = TRUE, box = FALSE)
grid.roundrect(width = 0.98, height = 0.98)
The rectangle is sitting in front of the venn diagram. In order to make it meaningful, two options: a) make the grid diagram transparent b) push the grid window to the back of the
library('venn')
library('grid')
venn(3, bpx = FALSE, box = FALSE)
grid.roundrect(width = 0.6, height = 0.6)
@miraquddus, this is not happening on my computer, neither on MacOS nor in Windows.
And, nevertheless, I have no control over the functions in package grid
, you need to read their manual.
I see that you have repeatedly used the argument bpx = FALSE
, which is not part of the function venn()
formal arguments (and, AFAIK, nor is it a formal option for the base par
).
Is there a special reason you are using that particular thing?
Thanks for your prompt reply and help to solve the issue. It works now. I really appreciate it.
You need an external package called
grid
, for instance: