skip to navigation
skip to content

matplotlib-subsets 1.0

Functions for plotting area-proportional hierarchical subset diagrams in matplotlib.

Routines for plotting area-weighted diagrams of subsets and subsets of subsets. This consistutes an extension to Venn diagrams in some sense (hierarchy), while a limitation in another (subsets only).


The simplest way to install the package is via easy_install or pip:

$ easy_install matplotlib-subsets


  • numpy, scipy, matplotlib.


The package provides the function: treesets_rectangles.

It takes a tree, where each node is defined as ((number-of-items-contained, label, dictionary-of-plotting-attributes), [child nodes…]).

For example:

tree = ((120, '120', None), [
        ((50, 'A50', None), []),
        ((50, 'B50', None), [])

plt.savefig('example_tree.pdf', bbox_inches='tight')

Here, the node ‘120’ is of size 120. It has two subsets, ‘A50’ and ‘B50’, each of size 50. No additional plotting attributes are given (e.g. the color of rectangles is chosen automatically).

See also

File Type Py Version Uploaded on Size
matplotlib-subsets-1.0.tar.gz (md5, pgp) Source 2013-12-04 3KB
matplotlib_subsets-1.0-py2.7.egg (md5, pgp) Python Egg 2.7 2013-12-04 6KB
  • Downloads (All Versions):
  • 4 downloads in the last day
  • 39 downloads in the last week
  • 212 downloads in the last month