Skip to main content

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

Project description

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).

Installation

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

$ easy_install matplotlib-subsets

Dependencies

  • numpy, scipy, matplotlib.

Usage

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), [])
        ])

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

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

Project details


Release history Release notifications

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for matplotlib-subsets, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size matplotlib_subsets-1.0-py2.7.egg (6.4 kB) File type Egg Python version 2.7 Upload date Hashes View hashes
Filename, size matplotlib-subsets-1.0.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page