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. Please help! Best regards
On Sat, Jul 12, 2014 at 6:53 PM, Josè Luis Mietta < joseluismietta@yahoo.com.ar> wrote:
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.
You're getting a TypeError I guess? The third line is incorrect, should be G = nx.graph.Graph(M) If that's not the issue and it's really about plotting, you should ask on the matplotlib users list. Ralf
Please send this question to the matplotlib-users mailing list (if you haven't already, I am still going through a huge backlog). This is the NumPy list. Ben Root On Sat, Jul 12, 2014 at 12:53 PM, Josè Luis Mietta < joseluismietta@yahoo.com.ar> wrote:
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.
Please help!
Best regards
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (3)
-
Benjamin Root -
Josè Luis Mietta -
Ralf Gommers