Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

plt.show() and plt.draw() doesnt work

Hi experts!

I have a numpy array M. I generate a graph using NetworkX and then I want to draw this graph:

import networkx as nx
import matplotlib.pyplot as plt
G=nx.graph(M)
nx.draw(G)
plt.draw()

Doing this, no picture appears. In addition, if I do plt.show() no picture appears ether.

Please help!

Best regards

plt.show() and plt.draw() doesnt work

Hi experts!

I have a numpy array M. I generate a graph using NetworkX and then I want to draw this graph:

import networkx as nx
import matplotlib.pyplot as plt
G=nx.graph(M)
nx.draw(G)
plt.draw()

Doing this, no picture appears. In addition, if I do plt.show() no picture appears ether.neither.

If I do

import numpy as np
import matplotlib.pyplot as plt
x = np.range(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)

no picture appears neither.

What happend?

Please help!

Best regards

plt.show() and plt.draw() doesnt work

Hi experts!

I have a numpy array M. I generate a graph using NetworkX and then I want to draw this graph:

import networkx as nx
import matplotlib.pyplot as plt
G=nx.graph(M)
G=nx.Graph(M)
nx.draw(G)
plt.draw()

Doing this, no picture appears. In addition, if I do plt.show() no picture appears neither.

If I do

import numpy as np
import matplotlib.pyplot as plt
x = np.range(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)

no picture appears neither.

What happend?

Please help!

Best regards