-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fit multiple euler plots at the same time and maintain proportionality #46
Comments
Thanks for noticing this! I have edited my answer there so that it should work properly now. Since the package no longer uses lattice, the library(eulerr)
p1 <- plot(euler(c(A = 1, B = 8, "A&B" = 1)))
p2 <- plot(euler(c(A = 1, C = 1, "A&C" = 1)))
gridExtra::grid.arrange(p1, p2) |
Is there anyway to combine them such that the area of A stays constant across the plots? |
No good way at the moment I'm afraid. But it shouldn't be hard to implement, as the following silly hack proves: m <- matrix(c(T, F, F,
rep(c(F, T, F), 8),
c(T, T, F),
c(T, F, T),
c(T, F, F),
c(F, F, T)), nrow = 3)
d <- as.data.frame(t(m))
colnames(d) <- LETTERS[1:3]
d$f <- c(rep("X", 10), rep("Y", 3))
g <- eulerr::euler(d, by = f)
plot(g) |
Is it possible to control the positions of the multiple plots? As in, if I have 4 plots to have the ability to have a 2x2 grid instead of a 1x4 (how it is currently handled). |
@Cumol, unfortunately not at the moment. But I agree that this would be a useful option. |
This SO response suggests that the following should work to generate multiple euler plots in shared axes.
However, this is the result:
The text was updated successfully, but these errors were encountered: