Skip to content

Latest commit

 

History

History
57 lines (34 loc) · 1.75 KB

README.md

File metadata and controls

57 lines (34 loc) · 1.75 KB

Venn Diagram Generator

This repository contains two Python scripts for generating Venn diagrams:

  1. venn2set.py: Generates all possible Venn diagram combinations for two sets (A, B).

demo

  1. venn3set.py: Generates all possible Venn diagram combinations for three sets (A, B, C).

demo

Features

Common Features:

  • Generates all unique combinations: Produces a complete set of Venn diagrams, covering all possible intersections and unions of the sets.
  • Customizable colors: Each diagram uses a unique color generated from a color palette.
  • Saves PNG images: The scripts save each diagram as a separate PNG image in the venn_diagrams folder.
  • Roboto font: Uses the Roboto font for a clean and modern look.

Specific Features:

  • venn2set.py:
    • Generates 2^3 = 8 unique combinations for two sets.
  • venn3set.py:
    • Generates 2^7 = 128 unique combinations for three sets.

Requirements

  • Python 3.x
  • matplotlib
  • matplotlib-venn
  • fonttools (for Roboto font)

Install the required packages using pip:

pip install matplotlib matplotlib-venn fonttools

Usage

For both scripts:

  1. Download the script: Download the desired script from this repository.
  2. Place Roboto font file: Make sure the RobotoMono-Regular.ttf font file is in the same directory as the script (or adjust the font_path variable in the script).
  3. Run the script: Execute the script using Python:

python venn2set.py # For two sets python venn3set.py # For three sets

  1. Check the output: The generated Venn diagrams will be saved in the venn_diagrams folder.

Example

The scripts will create a series of PNG files named venn_diagram_001.png, venn_diagram_002.png, and so on. Each file will contain a unique Venn diagram combination.