Draw Lex et al.'s UpSet plots with Pandas and Matplotlib
Project description
This is another Python implementation of UpSet plots by Lex et al. [Lex2014].
It tries to provide a simple, interface backed by an extensible, object-oriented design.
The basic input format is a pandas.Series containing counts corresponding to set intersection sizes. The index indicates which rows pertain to which sets, by having multiple boolean indices, like example in the following:
>>> from upsetplot import generate_data >>> example = generate_data(aggregated=True) >>> example # doctest: +NORMALIZE_WHITESPACE set0 set1 set2 False False False 56 True 283 True False 1279 True 5882 True False False 24 True 90 True False 429 True 1957 Name: value, dtype: int64
Then:
>>> from upsetplot import plot >>> plot(example) # doctest: +SKIP
makes:
Why an alternative to py-upset?
Probably for petty reasons. It appeared py-upset was not being maintained. Its input format was undocumented, inefficient and, IMO, inappropriate. It did not facilitate showing plots of each set intersection distribution as in Lex et al’s work introducing UpSet plots. Nor did it include the horizontal bar plots illustrated there. I decided it would be easier to construct a cleaner version than to fix it.
References
Alexander Lex, Nils Gehlenborg, Hendrik Strobelt, Romain Vuillemot, Hanspeter Pfister, UpSet: Visualization of Intersecting Sets, IEEE Transactions on Visualization and Computer Graphics (InfoVis ‘14), vol. 20, no. 12, pp. 1983–1992, 2014. doi: doi.org/10.1109/TVCG.2014.2346248
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file UpSetPlot-0.1a1.tar.gz
.
File metadata
- Download URL: UpSetPlot-0.1a1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53596af6efbe485f364e215418277ccc132e644b82abae17593692a7ff2d10d6 |
|
MD5 | a9c281f06a5396168856923110f9f9d3 |
|
BLAKE2b-256 | 952e4c0df6bd79f39552003bacfc2e7f1ee6c4131b395cbfaac74baa0387e862 |