Skip to content
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

plot number of items that lie outside the euler diagram #13

Open
Gian77 opened this issue Aug 31, 2017 · 5 comments
Open

plot number of items that lie outside the euler diagram #13

Gian77 opened this issue Aug 31, 2017 · 5 comments

Comments

@Gian77
Copy link

Gian77 commented Aug 31, 2017

Hello,
thank you so much for the nice Euler diagram implementation in R. I only have one question for you. I was looking at the plot.euler page and I wasn't able to find a way to plot a number outside the circles representing the items that are "outside" the euler diagrams and not belong to those grouping variables. Is there a way to do it?
Thanks a lot,
Gian

@jolars
Copy link
Owner

jolars commented Aug 31, 2017

Unfortunately there is no such argument, though I am not convinced there should be. I would argue that it's the intersections that are of interest in a Euler diagram and not the complement to those intersections. However, if you think otherwise I'm sure I could be persuaded.

In any case, it is very easy to fix this yourself. You could do one of the following two:

library(eulerr)
library(lattice)
library(latticeExtra)

plot(euler(c(A = 25, B = 25))) +
        layer(panel.key("n = 10", points = FALSE))

plot(euler(c(A = 25, B = 25, "NOT A, NOT C" = 10)))

@Gian77
Copy link
Author

Gian77 commented Aug 31, 2017

Hello @jolars
thanks a lot, it looks like it worked 👍

plot(euler(c("A" = 39, "B" = 202, "A&B"=46), labels = c("A","B")), fill_opacity = , fill=c("#33A02C","#1F78B4"), lty=0, fontface = 0, counts=TRUE, main="(A)") + layer(panel.key("n = 16", points = FALSE))

eurl

@jolars
Copy link
Owner

jolars commented Jan 3, 2018

I have given this thought and I do not think that I will support this since a principal feature of the diagrams is that the shapes are area-proportional and this is already a possibility by specifying a set that contains the other sets, like this (using ellipses):

plot(euler(c(C = 16, "A&C" = 39, "B&C" = 202, "A&B&C"=46), shape = "ellipse"))

image

Not perfect, but at least it maintains area-proportionality.

@jolars jolars closed this as completed Jan 3, 2018
@mkschneider
Copy link

First of all thanks for this great package. I am reopening the issue because I have a related question. Euler diagrams can be used to display the percentage of of explained variance due to various components. This is then a share of the total variance. Often the total is drawn as a box around the euler diagram and the size of the circles are scaled proportional to the proportions explained. Can this be achieved using eulerr?

@jolars
Copy link
Owner

jolars commented Jan 30, 2019

Unfortunately not @mkschneider. This would be difficult to achieve while still maintaining proportionality of the diagrams. I am open to pull requests addressing the issue but will not work on it myself. I'll reopen the issue, however.

@jolars jolars reopened this Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants