Skip to main content

Maintenance CI PyPI version License: AGPL v3 Made with Python

Introduction

This project is the Python implementation of Brad Smith's article on A Forced-Directed Diagram Layout Algorithm. There were a few bumps on the road to get Brad's code manually converted from a Microsoft graphics platform to a pseudo-platform independent platform like wxPython running on Mac OS. I will not go into detail on what those bumps were. But I want to make sure and document those here.

Details

Install in your virtual environment

pip install pyforcedirectedlayout

Configuration details

These drive the algorithm

Parameter Default Value Description
damping 0.1 Value between 0 and 1 that slows the motion of the nodes during layout.
springLength 100 Value in pixels representing the length of the imaginary springs that run along the connectors.
maxIterations 500 Maximum number of iterations before the algorithm terminates
attractionForce 0.1 The spring value
repulsionForce 10000 The repulsion value

Randomize the layout

Parameter Default Value Description
minPoint Point(x=10, y=10)
maxPoint Point(x=60, y=60)

Early Termination

Parameter Default Value Description
minimumTotalDisplacement 10
stopCount 15 Stop execution after this many number of iterations where the totalDisplacement is less that minimumTotalDisplacement

Developer Notes

This project uses buildlackey for day-to-day development builds


Note

For all kinds of problems, requests, enhancements, bug reports, etc., drop me an e-mail. Written by Humberto A. Sanchez II ©2026

Copilot Statement.

Metadata

Release files for pyforcedirectedlayout 2.2.0

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

Source distribution (sdist)

Source distribution for pyforcedirectedlayout 2.2.0
File Size Uploaded
pyforcedirectedlayout-2.2.0.tar.gz 27.0 kB Details

Built distribution (wheel)

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

Total release size: 56.6 kB

Release files / pyforcedirectedlayout-2.2.0.tar.gz

Download URL pyforcedirectedlayout-2.2.0.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5ab44450078613b590626d05b84c02712685901c024520a440f6e18c57de961f
BLAKE2b-256 checksum
How to use checksums
9fcac37b2ec65ae09cea9cad6f274a1a4dc5249d03d368a441b2bbde21e2e0c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / pyforcedirectedlayout-2.2.0-py3-none-any.whl

Download URL pyforcedirectedlayout-2.2.0-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05d07002fc6941ce8b33e9555e3f15f84179ac4fc2c4474724614612386ab6fa
BLAKE2b-256 checksum
How to use checksums
3d68b93b1dae99626975184cbdfc60a864d0d48aaa129be9655045bd3c829630
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.80.6

2 release files

0.80.5

2 release files

0.80.2

2 release files

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