2017-11-01 13:49 GMT+01:00 Andrew Z <form...@gmail.com>: > Wolfgang, > I tried to ran from ide with no rwsults, so now im trying from a terminal > in xwindow. > The .plot is the last line in the script and it does hang trying to execute > it. > > > On Nov 1, 2017 05:44, "Wolfgang Maier" < > wolfgang.ma...@biologie.uni-freiburg.de> wrote: > > On 01.11.2017 00:40, Andrew Z wrote: > >> hello, >> learning python's plotting by using matplotlib with python35 on fedora 24 >> x86. >> >> Installed matplotlib into user's directory. >> tk, seemed to work - >> http://www.tkdocs.com/tutorial/install.html#installlinux - the window >> shows >> up just fine. >> but when trying to run the simple plot ( >> https://matplotlib.org/examples/pylab_examples/simple_plot.html) the >> script >> is hanging on; >> >> plt.plot(t, s) >> >> attempts to >> matplotlib.interactive(True) didn't bring anything, >> >> > Hi Andrew, > > From which environment are you trying to run the example? In the terminal, > from within some IDE, inside a jupyter notebook? > > Are you sure the script "is hanging on plt.plot(t, s)" and not after that? > > Best, > Wolfgang > > -- Hi, sorry if it is too trivial, just to make sure, do you have a call to "show()" the resulting plot in the code?
An elementary plotting code might be e.g.: import matplotlib.pyplot as plt plt.plot([1,2,4,1]) plt.show() Does this work in your environment? It was not quite clear, what do you plan with interactive drawing, or whether you are using e.g. plt.interactive(True) already - this might be a problem as there could be collisions or the plot window is closed after the standalone script finishes. hth, vbr -- https://mail.python.org/mailman/listinfo/python-list