UpSetPlot
UpSetPlot copied to clipboard
Support for multisets?
I would like to generate a plot with non-unique values, so it can't be represented in a set, but could be represented in say a multi-set like acollections.Counter() object. Could this be supported? Thanks
The plot is designed to support a many-to-many relationship between items and categories. The set intersections depicted represent the subset of items present in and only in a group of categories indicated by the dots.
How does this notion of multiple categories differ from your use case?
Thanks. Maybe I'm not explaining myself well, I would like this to work:upsetplot.from_contents({"A": [1,2,1], "B": [1,3,4]}), which raises: ValueError: Got duplicate ids in a category. (In the same way that venn diagrams can support Counters() like in https://pypi.org/project/matplotlib-venn/) Does it make sense?
Hi @chris-rands, trying to understand your request again. What do you expect the difference to be between, say:
upsetplot.plot(upsetplot.from_contents({"A": [1,2,0], "B": [1,3,4]}))
and
upsetplot.plot(upsetplot.from_contents({"A": [1,2,1], "B": [1,3,4]}))
Currently from_contents treats the set of values as unique identifiers, which may then be used to join into the data parameter.
@chris-rands, could you please explain how to interpret your proposed usage?