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
According to the documentation spring_layout takes a weight-keyword which is the name of the edge attribute to use as weight when applying the layout. An example:
import networkx as nx
import random
G = nx.path_graph(5)
# Add some random weights (as dictonary with edges as key and weight as value).
nx.set_edge_attributes(G, 'my_weight', dict(zip(G.edges(), [random.random()*10 for edge in G.edges()])))
# Apply layout using weights.
pos = nx.spring_layout(G, weight='my_weight')
nx.draw(G, pos)