title: Networkx Spring Layout with Different Edge Values
body: <p>I am new to Networkx and trying to figure out how to use the spring layout but applying different edge values (i.e., different distances between nodes) between nodes rather than the same edge value. </p>
  
  <p>Essentially, I want a graph that tries to maintain a predefined set of node-node distances (likely using a spring layout to find some local minimum) with certain edges having a higher weight than others. However, the Networkx documentation suggests that all of the edges will have the same weight. </p>
  
  <p>Additionally, on a simple case of drawing the spring_layout graph, I noticed that the resulting graph changes conformation each time I run it. Is there a way to get the same graph back (i.e., setting some random seed)?</p>
  
  <pre><code>import networkx as nx
  G = nx.path_graph(5)
  nx.draw(G) 
  </code></pre>