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 | RSS feed

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.

Source Distribution

matplotlib-subsets-1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

matplotlib_subsets-1.0-py2.7.egg (6.4 kB view details)

Uploaded Egg

File details

Details for the file matplotlib-subsets-1.0.tar.gz.

File metadata

File hashes

Hashes for matplotlib-subsets-1.0.tar.gz
Algorithm Hash digest
SHA256 c2087c9dd5deea3dfc4051cf1e7e8c9edd86a3995802a3e338c2b463f6793315
MD5 c0410765929005d391eabb52880db81a
BLAKE2b-256 0e9ee7f6d1203eb0990e76d0225efb711512485019ce34c34664dc84eb51837e

See more details on using hashes here.

File details

Details for the file matplotlib_subsets-1.0-py2.7.egg.

File metadata

File hashes

Hashes for matplotlib_subsets-1.0-py2.7.egg
Algorithm Hash digest
SHA256 5144b3cda7776a9949d6ab38416e8ca6b53f820c2e68075dc68caf1a9bce85df
MD5 bf5e42bc4919f68302b7092c27da46ac
BLAKE2b-256 0c31326e23351327ee79c46ec38d608afdee8a2ad05c983e683390633458c95d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page