bhargavchippada / forceatlas2

Fastest Gephi's ForceAtlas2 graph layout algorithm implemented for Python and NetworkX
GNU General Public License v3.0
280 stars 80 forks source link

Maintain position history #11

Open beyondbeneath opened 5 years ago

beyondbeneath commented 5 years ago

This pull request adds the ability to maintain the position history while the ForceAtlas2 algorithm progresses (just within the NetworkX function, for now). This is useful if you want to create animations of the nodes from random to reaching their final resting positions.

By passing keep_history=True, it will return both the final positions, and a list of all the positions throughout the iterations.

bhargavchippada commented 5 years ago

@beyondbeneath Thanks for this useful functionality, I will merge the changes soon. Cheers! 👍

Aalgarnaal commented 4 years ago

Would be great to have this! Is there any update on the progress for this feature?

filannim commented 3 years ago

Any news on that review?

beyondbeneath commented 3 years ago

There's not a lot of active developers on this repo @filannim - but if you're after the seeding, if using the PR branch is not sufficient, I think you can literally just import random and then random.seed(1) from wherever you are running it, and it might actually do what you need.