This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This is a port of Gephi’s ForceAtlas2 layout algorithm to Python 2 and Python 3 (with a wrapper for NetworkX).


The only strict dependency is Numpy. Cython is highly recommended, as it will speed it up by a factor of 10-100, depending on the graph. Both can be installed with:

pip install numpy pip install cython

To use the NetworkX wrapper function, you obviously need NetworkX.

Then to install this package, it is the typical:

python install

Example usage

Two core functions are defined:

  • forceatlas2.forceatlas2 takes an adjacency matrix and optionally initial positions and other optional arguments. It uses this to calculate a layout.
  • forceatlas2.forceatlas2_networkx_layout takes a NetworkX graph and returns a NetworkX-compatible layout.

To use within NetworkX:

import matplotlib.pyplot as plt import networkx import random import forceatlas2 G = networkx.karate_club_graph() pos = { i : (random.random(), random.random()) for i in G.nodes()} # Optionally specify positions as a dictionary l = forceatlas2.forceatlas2_networkx_layout(G, pos, niter=1000) # Optionally specify iteration count networkx.draw_networkx(G, l)

Note that my coding style is non-Pythonic, as I don’t use function docstrings. You will have to take a look at the function definition in to see a description of all of the potential arguments.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ForceAtlas2-1.0.tar.gz (6.8 kB) Copy SHA256 Checksum SHA256 Source May 25, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting