Skip to main content

EvoEuler: Evolving Euler and Venn Diagrams with Specific Properties

EvoEuler searches for Euler and Venn diagrams with a simple closed shape using a multi-objective evolutionary algorithm. Both a web interface and an application programming interface (API) are available.

EvoEuler allows users to:

  • specify optional constraints (symmetric diagram and congruent shape) before optimization.
  • obtain a set of non-dominated solutions (diagrams), each evaluated with five objectives (missing zone, unwanted zone, triple point, concurrency, and disconnected zone) that quantify the violation of well-matchedness or well-formedness properties.
  • explore trade-offs among non-dominated solutions via parallel coordinates plots that visualize the objective values of all solutions.

Installation

Run the following command to install EvoEuler:

pip install evoeuler

Web Interface

Run the following command to launch the web interface:

evoeuler

EvoEuler Web Interface Compared to the API, the web interface additionally allows users to draw, redraw, round, smooth, or view custom simple closed shapes, which can then be used for diagram generation.

API

The example below shows the use of all functions provided by the API.

The supported algorithms for the API are: NSGA-II and NSGA-III.

The supported shapes for the API are: circle, ellipse, rectangle, rounded_rectangle, equilateral_triangle, rounded_equilateral_triangle, square, rounded_square, pentagon, rounded_pentagon, hexagon, rounded_hexagon, heptagon, rounded_heptagon, octagon, rounded_octagon, nonagon, rounded_nonagon, decagon, and rounded_decagon.

Note that if symmetric is set to True, congruent will be automatically set to True.

"""Search for symmetric Venn-3 diagrams with congruent ellipses."""

import matplotlib.pyplot as plt

from evoeuler import diagram, obj_values, optimize, pcp, shape_params, zone_info

if __name__ == "__main__":
    # Start an optimization.
    result = optimize(
        zones={"A", "B", "C", "A B", "A C", "B C", "A B C"},
        shape="ellipse",
        algorithm="NSGA-II",
        n_gen=100,
        n_process=1,
        time=None,
        symmetric=True,
        congruent=True,
    )

    # Print the number of non-dominated solutions.
    print(f"Number of non-dominated solutions: {len(result)}")

    # Show the parallel coordinates plot that visualizes the objective values
    # of all non-dominated solutions.
    fig = pcp(result)
    fig.show()

    solution_idx = 0  # Solution index

    # Show the diagram of a non-dominated solution.
    diagram(
        result[solution_idx], show_zone_labels=False, shade_unwanted_zones=True
    )
    plt.show()

    # Print the objective values of a non-dominated solution.
    print("Objective values:")
    print(obj_values(result[solution_idx]))

    # Print the zone information of a non-dominated solution.
    print("Zone info:")
    print(zone_info(result[solution_idx]))

    # Print the shape parameters of a non-dominated solution.
    print("Shape params:")
    print(shape_params(result[solution_idx]))

Examples

Some example scripts for searching Euler or Venn diagrams are in ./examples.

Contact

If you have any questions, please contact Chi Ho Chan at c.chan3@napier.ac.uk.

Metadata

Release files for evoeuler 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evoeuler 1.0.1
File Size Uploaded Provenance Actions
evoeuler-1.0.1.tar.gz 36.8 kB Without provenance Details for evoeuler-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evoeuler 1.0.1
File Interpreter ABI Platform Actions
evoeuler-1.0.1-py3-none-any.whl Python 3 none any Details for evoeuler-1.0.1-py3-none-any.whl

Total release size: 77.3 kB

Release files / evoeuler-1.0.1.tar.gz

Download URL evoeuler-1.0.1.tar.gz
Size 36.8 kB
Tags Source
SHA-256 checksum
How to use checksums
468889aec94a0787d1cef7956fcafb2ac6b8c5746915759183ae3a1e5e1c0a8f
BLAKE2b-256 checksum
How to use checksums
ef6ef7a800fd62d076275891afd582e42481860c6048cbb2859804ba0ccc0bcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / evoeuler-1.0.1-py3-none-any.whl

Download URL evoeuler-1.0.1-py3-none-any.whl
Size 40.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
102cdf2ed84e0edd39ae0d461f10131178751daff4052c2e201f8ff400407cf1
BLAKE2b-256 checksum
How to use checksums
deb3e49e379910952ad68f14690f0943917c12464e0b73e1efb8f6315697da06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for evoeuler 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page