Using VennDiagram
package I'm generating two graphs in the following manner:
# First graph
VennDiagram::draw.pairwise.venn(
area1 = 100,
area2 = 70,
cross.area = 30,
category = c("A1", "B1"),
fill = c("#00204DFF", "#FFEA46FF")
) -> vg1
# Second graph
VennDiagram::draw.pairwise.venn(
area1 = 120,
area2 = 80,
cross.area = 10,
category = c("A2", "B2"),
fill = c("#000004FF", "#FCFFA4FF")
) -> vg2
When called via grid::grid.draw(vg1)
and grid::grid.draw(vg2)
the charts show as expected:
grid::grid.draw(vg1)
grid::grid.draw(vg2)
How can I create one grid object where both plots are placed one under another?
grdFrme <- grid::grid.frame(name = "gf")
grid::grid.pack("gf", vg1)
Error in packGrob(grid.get(gPath), grob, side, row, row.before, row.after, : invalid 'grob'
On the Insert tab, in the Illustrations group, click SmartArt. In the Choose a SmartArt Graphic gallery, click Relationship, click a Venn diagram layout (such as Basic Venn), and then click OK.
Venn diagrams are charts with overlapping circles that indicate how much different groups have in common. Charts supports Venn diagrams with two or three circles.
3. The third type is Stacked Venn. This is used to show overlapping relationships and is considered a good choice for emphasizing growth or gradation of an organization or business.
One solution could be to use awesome multipanelfigure
package (fill the panels with base, 'lattice', 'ggplot2' and 'ComplexHeatmap' plots, grobs, and PNG, JPEG, SVG and TIFF images).
library(multipanelfigure)
figure <- multi_panel_figure(columns = 1, rows = 2)
figure %<>%
fill_panel(vg1) %<>%
fill_panel(vg2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With