Skip to main content

Area-proportional Euler and Venn diagrams

Project description

Eunoia

CI PyPI version

Python bindings for the Eunoia, a Rust library for fitting area-proportional Euler and Venn diagrams. Sister package to the R package eulerr.

Install

pip install eunoia

Quickstart

import eunoia as eu
import matplotlib.pyplot as plt

# Disjoint (per-region) input is the default.
fit = eu.euler({"A": 10, "B": 5, "A&B": 3})
print(fit)
# EulerFit (2 circles, diag_error=2.776e-17, stress=5.887e-33, loss=5.887e-33)
#                  original      fitted    residual regionError
#   A                    10          10           0           0
#   B                     5           5           0           0
#   A&B                   3           3   8.882e-16   2.776e-17

fit.plot()
plt.show()

Inclusive input

If your numbers are set sizes that already include their overlaps, pass input="inclusive" and the eunoia core handles the inclusion-exclusion conversion:

fit = eu.euler({"A": 13, "B": 8, "A&B": 3}, input="inclusive")

Ellipses

Ellipses are more flexible than circles and fit many three-set arrangements exactly:

fit = eu.euler(
    {"A": 2, "B": 2, "C": 2, "A&B": 1, "A&C": 1, "B&C": 1},
    shape="ellipse",
)
print(fit.diag_error)  # ~1e-14
fit.plot(quantities=True)

Plot styling

fit.plot(
    colors=["#e41a1c", "#377eb8", "#4daf4a"],   # per-set
    quantities="fitted",                          # show fitted areas at region anchors
    labels=True,                                  # set names at set anchors
    edges={"linewidth": 1.5},
)

Public API

Function / class Purpose
eunoia.euler(values, …) Fit a diagram from a {combination: area} dict
eunoia.EulerFit Result class with shapes, fitted values, metrics
eunoia.Circle/Ellipse Per-set fitted shape
eunoia.Point 2D point
eunoia.EunoiaError Base error type (subclass of ValueError)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eunoia-0.2.0.tar.gz (232.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

eunoia-0.2.0-cp311-abi3-win_amd64.whl (761.2 kB view details)

Uploaded CPython 3.11+Windows x86-64

eunoia-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

eunoia-0.2.0-cp311-abi3-musllinux_1_2_aarch64.whl (888.3 kB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

eunoia-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl (809.3 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

eunoia-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl (711.3 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

eunoia-0.2.0-cp311-abi3-macosx_11_0_arm64.whl (689.5 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

eunoia-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl (767.2 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file eunoia-0.2.0.tar.gz.

File metadata

  • Download URL: eunoia-0.2.0.tar.gz
  • Upload date:
  • Size: 232.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eunoia-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3be333d90009a0fc2e25c801cea5236804de26750f1c5fedaebcea9d458114bc
MD5 b4d690b404508cafa6bce65504525374
BLAKE2b-256 2ead947f4dafb4ae85034957748b51996c709cce43dfd34613f70d8c79a79973

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0.tar.gz:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eunoia-0.2.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: eunoia-0.2.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 761.2 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eunoia-0.2.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d02721a491aa60ee3346acdcec8e730d2cb2490049d381bcca94c939b4eea76a
MD5 ec83144e867fbab1b3d211481aa51113
BLAKE2b-256 bb0aa5344e4a16aab17c86382e6b6c1c84970e036ef870549c8b8f2c9ab0f7ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0-cp311-abi3-win_amd64.whl:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eunoia-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for eunoia-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7d4bfa8a4adbd10b808f218cd59db9a1b4367d497061612d672e35bb08b7f34f
MD5 9ee35dc567797d846c290250580186be
BLAKE2b-256 6d59e64e7efceca4c016822091ed3521b1ddf4f5c3025bb59edc334740e5acc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0-cp311-abi3-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eunoia-0.2.0-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for eunoia-0.2.0-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 dfd5b4b574bc03f755615ae28c1902b659a1f1a9ab91eaefc8488aa68b15bff8
MD5 2b0e7d91c8dc7fb6bee09f9c2ea993a5
BLAKE2b-256 a7df338d9fd0ea045ba331828ff9039e8f319b1569754e048e46955ddc86b61f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0-cp311-abi3-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eunoia-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for eunoia-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9cbf3abe133bdf511392b76d378226e7a97f2c5dd5e27f7280aea80c8895949d
MD5 d5041ee926e958ca164a899187e321d2
BLAKE2b-256 9238151a24676b85593db13c73c9877834041df74b64b94eea6a7f0a95047ba2

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eunoia-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for eunoia-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e25121f9a5b7b3a5bd8173772e25052661ddfbb0b448c29fb12c4bbc6c95360c
MD5 b27c659caca16a927b07e961985c7c7c
BLAKE2b-256 3f8a62f10242202ba4826f9acbeaa3dc7f2ca77c6df214749fb4e59de1868064

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eunoia-0.2.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eunoia-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7161d80b330bfd34f17e8df4bcc239129653892946171e308ea91b96a875cc69
MD5 3b688085ac1e00056775a2eb919c5452
BLAKE2b-256 260499dd91677a0927bf62eef6a5fcd8d65c2c10f3707a1056683268eebd9ab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eunoia-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for eunoia-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8ed2213cde1762bcd20c3fd298083a35cb2bafb6095af1e20d43f9743031e11b
MD5 d4f0e29f9e1c106bcb0dcdf5e06f54f1
BLAKE2b-256 99480376273b6318373956fd31109d617a0c7c6b28ee50eec6f3dcb36bfc43fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for eunoia-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: publish.yml on jolars/eunoia-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page