0

usecase -: plot some relationships between datasets using "set theory" where I need to represent overlaps(intersection) and differences, union and universal space, all objects being integer numbers that represent the "weight" of the object.

number_a=100
number_b=50 
number_a intersection number_b = 12
number_a-number_b =100-12 
number_b-number_a=50-12 
universal set =160, some of these not in a & b etc.

So I need to visually represent, a & b with the weights of a-b, b-a and a intersection b .. etc.

Apart from customizing Networkx & matplotlib, with nodes & their weights, wondering what else can be used for this use-case ? More specifically, I am not sure how I could represent the overlap with different colors representing the relationships as above, with numbers superimposed above them.

ekta
  • 1,560
  • 3
  • 28
  • 57
  • Interesting question, but not a good fit for SO. I would try on math.se (if you agree flag your own question and ask a moderator to migrate it). – tacaswell Nov 12 '14 at 13:19
  • I intend to use it work with Python, so that it can seamlessly consume data from within my script. If there's none that exists, I would be happy to migrate, so long it can be "automated", and not a plotting task, like as in Excel etc. – ekta Nov 12 '14 at 18:01
  • Are you asking how to draw Venn Diagrams showing how much is in each part? That's the only representation I'm aware of for showing this sort of data. – Joel Dec 16 '14 at 03:17
  • @Joel sort of, yes, but in Python. Are you aware of something ? – ekta Dec 16 '14 at 06:28

1 Answers1

2

I'm definitely not an expert on this, but take a look at https://pypi.python.org/pypi/matplotlib-venn. There's some discussion of this at Python Matplotlib Venn diagram. Here's a blog post about it: http://fouryears.eu/2012/10/13/venn-diagrams-in-python/

These all deal with a matplotlib extension doing Venn Diagrams. The first link is where you go to download. The other two show some examples and discuss the use.

Community
  • 1
  • 1
Joel
  • 22,598
  • 6
  • 69
  • 93