Skip to content

Forceatlas2 - #7543

Merged
rossbar merged 39 commits into
networkx:mainfrom
rossbar:forceatlas2
Aug 7, 2024
Merged

rossbar merged 39 commits into
networkx:mainfrom
rossbar:forceatlas2

Conversation

@rossbar

@rossbar rossbar commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

Continuation of #5392

Opening this one instead of #7521 to disable force-pushing by non-maintainers to ensure that changes made during the review process are not accidentally lost.

A quick summary of the discussion form #5392 - the addition of the forceatlas2 layout to networkx has been approved, all that remains is to ensure that API is "networkx-y"!

@rossbar rossbar added type: Enhancements Visualization Related to graph visualization or layout labels Jul 3, 2024
Comment thread networkx/drawing/layout.py Resolved

@dschult dschult left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together @rossbar. And thanks @cvanelteren for putting up with us for so long. finishing touches are on their way. :)

Comment thread networkx/drawing/layout.py Resolved
Comment thread networkx/drawing/layout.py Resolved
@rossbar

rossbar commented Jul 23, 2024

Copy link
Copy Markdown
Contributor Author

I had a chance to dig through the rest of the reviews from #5392 that had been marked "resolved" and apply any changes that had accidentally been reverted/removed. This PR should now be in a state where all of the comments from previous review have been applied!

@dschult

dschult commented Jul 25, 2024

Copy link
Copy Markdown
Member

Removed a divide-by-zero RunTimeWarning that showed up after the numpy 2.0 release.

Added the default values to the doc_string parameter descriptions.

Revamped the initial position code to place the initial points within the smallest rectangular region that includes all the inputted position nodes. If no nodes are given initial positions, the region is the units square $x, y \in [0, 1]$.

I added the seed parameter to allow setting initial node positions in a deterministic way. This was also missing from arf_layout, so I added it there as well.

I believe this is ready for review -- and maybe merging. 🎉 if tests passed.

@dschult dschult left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. :)

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM as well - thanks @cvanelteren and @dschult for your resilience and hard work getting this over the finish line!

@rossbar
rossbar merged commit 82efb9e into networkx:main Aug 7, 2024
@rossbar
rossbar deleted the forceatlas2 branch August 7, 2024 22:49
@dschult dschult added this to the 3.4 milestone Aug 28, 2024
rossbar added a commit to Peiffap/networkx that referenced this pull request Sep 6, 2024
Add the forceatlas2 layout to NetworkX

---------

Co-authored-by: cvanelteren <[email protected]>
Co-authored-by: Dan Schult <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Enhancements Visualization Related to graph visualization or layout

Development

Successfully merging this pull request may close these issues.

3 participants