milkviz.venn(data: Union[List[Set], List[List[Any]], List[int]], names: Optional[List[str]] = None, colors: Optional[List[str]] = None, alpha: Optional[Union[float, List[float]]] = None, subset_labels: Optional[List[str]] = None, normalize_to: float = 1.0, weighted: bool = True, ax: Optional[Axes] = None) Axes#

Venn diagrame for 2 & 3 Sets

This is a wrapper around matplotlib-venn, allows you to input raw data and compute intersection for you.

  • data – 1) A list of sets 2) A list of list, will compute intersection, duplication will be considered. 3) A list of number denotes the regions in venn diagram in the following order: (10, 01, 11) or (100, 010, 110, 001, 101, 011, 111)

  • names – The name for each sets

  • colors – The color for each sets

  • alpha – The alpha value for each sets

  • subset_labels – The label for each small regions, usually denotes the size, following the order as described before

  • normalize_to – specifies the total (on-axes) area of the circles to be drawn. Sometimes tuning it (together with the overall fiture size) may be useful to fit the text labels better.

  • weighted – If True, the circle area is weighted by the size of sets

  • ax – Pre-existing axes for the plot. Or a new one will be created.


A matplotlib.axes.Axes instance