|
From: Josè L. M. <jos...@ya...> - 2014-07-13 16:34:53
|
Hi experts. I have two problems: 1) plt.show() doesnt work: When i draw simple plot doing importnumpy asnp importmatplotlib.pyplot asplt x =np.range(0,5,0.1);y =np.sin(x)plt.plot(x,y) plt.show() no picture appears.I try to do this: http://stackoverflow.com/questions/7534453/matplotlib-does-not-show-my-drawings-although-i-call-pyplot-show, but I cant save changes in the file matplotlibrc. But, If I do: importnumpy asnp importmatplotlib.pyplot asplt x =np.range(0,5,0.1);y =np.sin(x)plt.plot(x,y) plt.savefig('pppp.png') the picture is generated and saved.2. When I try to draw a Graph (using NetworkX and Matplotlib) doing: importnumpy asnp importmatplotlib.pyplot asplt improt networkx as nx x =nx.Graph(M) #M is my matrix nx.draw(x) plt.savefig('jjj.png') I always get a pictule like the attached file. How can I restore my old-drawing style? Waiting for your answer. Thanks a lot!! |