helios.layouts.force_directed¶
Helios Force-Directed Layout using octree
References
[1] Fruchterman, T. M. J., & Reingold, E. M. (1991). Graph Drawing by Force-Directed Placement. Software: Practice and Experience, 21(11). [2] Y. Hu, “Efficient, High-Quality Force-Directed Graph Drawing,” The Mathematica Journal, p. 35, 2006.
HeliosFr¶
-
class
helios.layouts.force_directed.
HeliosFr
(edges, network_draw, viscosity=0.3, a=0.0006, b=1, max_workers=8, update_interval_workers=0, velocities=None)[source]¶ Bases:
helios.layouts.base.NetworkLayoutAsync
A 2D/3D Force-directed layout method
This method is a wrapper for the helios force-directed algorithm, heliosFR. HeliosFr is a force-directed layout algorithm that is based on oct-trees. The algorithm is designed to work with a large number of nodes and edges.
References
[1] Fruchterman, T. M. J., & Reingold, E. M. (1991). Graph Drawing by Force-Directed Placement. Software: Practice and Experience, 21(11).
- Parameters
edges (ndarray) –
network_draw (NetworkDraw) –
viscosity (float, optional) –
a (float, optional) –
b (float, optional) –
max_workers (int, optional) – number of threads
update_interval_workers (float, optional) – When you set this to a value greater than zero the helios-fr will wait to perform each step. This can be used to reduce the CPU consumption
- Variables
network_draw (NetworkDraw) – The NetworkDraw Instance
-
start
(ms=15)[source]¶ Starts the helios force-directed layout using others threads (async).
- Parameters
ms (float, optional) – Interval in milleseconds to update the node and edge positions in the network visualization.