milkviz.upset#

milkviz.upset(data: List[List[Any]], names: Optional[List[str]] = None, orient: str = 'v', min_subset_size: Optional[int] = None, max_subset_size: Optional[int] = None, min_degree: Optional[int] = None, max_degree: Optional[int] = None, show_counts: bool = True, show_percentages: bool = False, fig: Optional[Figure] = None, **kwargs) Figure#

Upset plot for intersections between arbitary sets

This is simply a wrapper around upsetplot

Unlike venn, this will not consider duplicates

Parameters
  • data – A series of anything, set will be auto computed for it

  • names – The name for each set

  • orient – “v” or “h”

  • {min – Minimum/Maximum size threshold of a subset to be shown in the plot.

  • max}_subset_size – Minimum/Maximum size threshold of a subset to be shown in the plot.

  • {min – Minimum/Maximum degree of a subset to be shown in the plot

  • max}_degree – Minimum/Maximum degree of a subset to be shown in the plot

  • show_counts – Whether to label the intersection size bars with the cardinality of the intersection.

  • show_percentages – Whether to label the intersection size bars with the percentage of the intersection relative to the total dataset.

  • **kwargs – Pass to upsetplot.UpSet

Returns

A matplotlib.figure.Figure object