If None the distance is set toġ/sqrt(n) where n is the number of nodes. Parameters G NetworkX graph or list of nodesĪ position will be assigned to every node in G. In addition, setting scale to None turns off rescaling. It also turns off the rescaling feature at the simulation’s end. Rescaling occurs at the end of the simulation.įixing some nodes doesn’t allow them to move in the simulation. Though scale and center determine the size and place after Nodes (0.01) and “temperature” of 0.1 to ensure nodes don’t fly away.ĭuring the simulation, k helps determine the distance between nodes, There are some hard-coded values: minimal distance between Simulation continues until the positions are close to an equilibrium. Treating edges as springs holding nodes close, while treating nodesĪs repelling objects, sometimes called an anti-gravity force. The algorithm simulates a force-directed representation of the network Position nodes using Fruchterman-Reingold force-directed algorithm. _layout ¶ spring_layout ( G, k = None, pos = None, fixed = None, iterations = 50, threshold = 0.0001, weight = 'weight', scale = 1, center = None, dim = 2, seed = None ) ¶
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |