I'm using the following plot() function which I stumbled upon after experiments. previous question
def plot(self):
plt.figure()
pos = nx.graphviz_layout(self.g, prog='dot')
nx.draw(self.g, pos, node_size=660, node_color='#aaaaff' )
The graph looks OK (it is hierarchal, with 3 layers) if the internally some edge connections use floating point numbers like the following example Look at 2.0, 3.0,... :
{1: {21: {}},
2: {22: {}},
3: {},
21: {2.0: {}, 52: {}},
22: {3.0: {}},
52: {22.0: {}}}
But if the internals are pure integers like the example below everything goes WRONG :
{1: {21: {}},
2: {22: {}},
3: {},
21: {2: {}, 52: {}},
22: {3: {}},
52: {22: {}}}
It is the same for bigger graphs too. This was just one example.
Any idea why this may happen ?? and solution ...