If I generate the same graph multiple times using NetworkX and Matplotlib it's rotated randomly on every generation:
Without changing the script or input data, the graph is randomly rotated every time it is generated. Is it possible to specify an orientation?
As the graph becomes more densely populated (above are just samples but ultimately I will have thousands of nodes and edges), it will be difficult to see the newly added nodes or edges if they are moved because the graph picture is rotated.
import networkx as nx
import matplotlib.pyplot as plt
from networkx.readwrite import json_graph
#
# The graph data is loaded from JSON
#
graph = json_graph.node_link_graph(input_json)
pos = nx.spring_layout(graph)
nx.draw(graph, pos, with_labels=True, node_size=300)
edge_labels=dict([((u,v,),d['weight']) for u,v,d in graph.edges(data=True)])
nx.draw_networkx_edge_labels(graph, pos, edge_labels=edge_labels)
plt.savefig("test.png")
A second less important question is why are the edges/lines from R1 to R2 and R1 to R5 so much longer? Update: I hadn't set the "length" attribute in the JSON data source.

