-
Notifications
You must be signed in to change notification settings - Fork 68
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
4-way venns? #15
Comments
Yes, I will probably add the non-area-weighted 4-set diagram eventually by borrowing the layout from this implementation. It does not split the diagram into separate regions, otherwise you'll get quite decent 4-ellipse fixed diagram there. Try it. I must note, however, that I personally find that the 4-circle case is already visually too complex and not as useful. |
Thanks for sharing that. That's exactly the sort of layout I was thinking of. |
Hi Konstantin, thanks for the great work! Best regards, |
As you might note, so far I am kind-of putting this issue off indefinitely so far (hoping perhaps someone else might step up). Let's say I'll try to convince myself to implement that within a couple of next months. The link above to the venn.py implementation seems to be outdated. An alternative link to the same file would be: https://github.com/ksahlin/pyinfor/blob/master/venn.py |
Hi Konstantin, nice project, I take it that "within a couple of next months" hasn't happened yet? What stumbling blocks do you face with this and how much work do you think it would need? I have taken a quick look at the Venn wiki page and it looks interesting, but I guess the maths involved gets quite challenging (I prefer applied maths over pure). From what I gather from my quick glance, this package doesn't create Venn diagrams but Euler diagrams which I think I prefer as it seems to get rid of extraneous data and thus makes it easier to read. This has made me thinking, as this package draws Euler diagrams, then do you see it as a possibility to generalise the API to construct an N-set Euler diagram where the sets happen to simplify and if not throw a A generic N-set API would for example detect if the sets exist as a collection of lone-set, venn2, and venn3 diagrams and if not, throw a not implemented error. A further step of implementing more complex diagrams would involve identifying chains, i.e. expanding beyond diagrams such as: import matplotlib.pyplot as plt
from matplotlib_venn import venn3
set1 = set(['A', 'B', 'C'])
set2 = set(['C', 'D', 'E'])
set3 = set(['E', 'F', 'G'])
venn3([set1, set2, set3], ('Set1', 'Set2', 'Set3'))
plt.show() Another (in theory) simple N-set case, with further expansion to "Set1" and "Set3" getting replaced by What do you think? |
Yes, you are right - I still did not find the time to implement the four-way venn. One of the reasons is that, well, there just do not seem to be too much demand for that, nor would anyone want to step in. You may call the diagrams Euler-diagrams. I don't think the terminology really matters here as long as people understand what is meant. I personally am used to calling these diagrams Venn, even if they are weighted or do not include some of the zero-size subsets. I was considering making an N-set diagram visualization, indeed, however this would require a more complicated general optimization procedure for laying out the circles and a completely different graphics engine instead of the ad-hoc circle intersections I am computing in my code (something based on Implementing an ad-hoc "chain-detection" method which would only work on some datasets does not seem very useful to me (at least not as long as I see a large set of use cases for these particular cases). Anyway, as far as this particular task is concerned, what needs to be done is a rewrite of the existing code with four ellipses with an added function which splits the ellipses into the respective patches. My current ad-hoc approach for computing patch geometry is painful to generalize as it would require hand-specifying all the arcs. Relying on |
It would be so great that the 4-way venn diagram was done, I'd collaborate if I was more than a mere beginner in Python |
Just throwing this out there, there is a 2-6 venn diagrams available here. Also, I'd be interested in a 4-way Venn too, so. I'll look into stepping up to create that. |
This R library does 4-way venns with somewhat proportional intersections: https://rdrr.io/cran/eulerr/man/plot.euler.html |
I have played with that library but unfortunately they are not particularly helpful I find, as they are more schematic and not actually proportional, which is the main benefit of this one! The maths looks horrid though for going above 3, so while I hope for it to happen, for now I shall be doing multiple venn3 with different combinations of sets! |
Hi,
I love this package, it's fantastic. I was wondering if you had any plans to extend it to 4-way venns as well. (Or know of a good python package for that?) As far as I know, proportional 4-way venns are not possible with circles or elipses, but even non-proportional ones would be quite useful.
Louis
The text was updated successfully, but these errors were encountered: