| eulergram-compose | R Documentation |
Arrange two eulergram objects side-by-side or stacked, building up
multi-panel layouts with operator syntax. Compositions can be nested
arbitrarily, e.g. (p1 | p2) / p3.
## S3 method for class 'eulergram'
e1 | e2
## S3 method for class 'eulergram'
e1 / e2
e1, e2 |
|
| arranges the two plots horizontally; / stacks them vertically.
The result is itself an eulergram, so further composition chains
naturally.
The gap between adjacent plots is controlled by the
composition$spacing entry of eulerr_options(), which must be a
grid::unit() and defaults to grid::unit(1, "lines").
Because composition is binary and recursive, panels at different
nesting levels are not size-aligned. In (p1 | p2) / p3, p3 spans
the full bottom row while p1 and p2 split the top row equally.
An eulergram containing the composed layout.
plot.euler(), eulerr_options()
p1 <- plot(euler(c(A = 1, B = 8, "A&B" = 1)))
p2 <- plot(euler(c(A = 1, C = 1, "A&C" = 1)))
p1 | p2
p1 / p2
p3 <- plot(euler(c(X = 3, Y = 2, "X&Y" = 1)))
(p1 | p2) / p3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.