class_docstr: Fruchterman-Reingold implementation adapted from NetworkX.
  
  In the Fruchterman-Reingold algorithm, the whole graph is modelled as a
  collection of particles, it runs a simplified particle simulation to
  find a nice layout for the graph.
  
  Parameters
  ----------
  optimal : number
      Optimal distance between nodes. Defaults to :math:`1/\\sqrt{N}` where
      N is the number of nodes.
  iterations : int
      Number of iterations to perform for layout calculation.
  pos : array
      Initial positions of the nodes
  
  Notes
  -----
  The algorithm is explained in more detail in the original paper [1]_.
  
  .. [1] Fruchterman, Thomas MJ, and Edward M. Reingold. "Graph drawing by
     force-directed placement." Softw., Pract. Exper. 21.11 (1991),
     1129-1164.
code: def __init__(self, optimal=None, iterations=50, pos=None):
      self.dim = 2
      self.optimal = optimal
      self.iterations = iterations
      self.num_nodes = None
      self.pos = pos
  
file_path: vispy/vispy/visuals/graphs/layouts/force_directed.py
imports: import numpy
  from ..util import _straight_line_vertices, _rescale_layout
label_desc: Use image node_id 1 to create a new fruchterman_reingold object from inherited base classes: object with example: obj = fruchterman_reingold(optimal, iterations, pos)