If I generate the same graph multiple times using NetworkX and Matplotlib it\'s rotated randomly on every generation:
Run 1:
Run 2:
Without changin
The algorithm has a random initialization - this is quite standard for network layouts. You will have the same issue with any graph library. You can replicate the same layout in NetworkX in two ways: save the node position dictionary (for example as a json) and reload it every time you want to visualize, or pass a seed to the layout algorithm:
seed (int, RandomState instance or None optional (default=None)) – Set the random state for deterministic node layouts. If int, seed is the seed used by the random number generator, if numpy.random.RandomState instance, seed is the random number generator, if None, the random number generator is the RandomState instance used by numpy.random.
hope that helps!