Re: matplot plot hangs
Tim, it won't even advance to that line. On Thu, Nov 2, 2017 at 8:28 AM, Tim Williamswrote: > On Wednesday, November 1, 2017 at 6:30:27 PM UTC-4, Andrew Z wrote: > > nope. it doesnt: > > > > I added print-s after each line and that produced: > > [az@hp src]$ cat ./main1.py > > import matplotlib.pyplot as plt > > print("imported") > > plt.plot([1,2,4,1]) > > print("plot is done") > > plt.show() > > print("show is done") > > > > [az@hp src]$ python3.5 ./main1.py > > imported > > ^C^Z > > [1]+ Stopped python3.5 ./main1.py > > > > > > On Wed, Nov 1, 2017 at 9:31 AM, Vlastimil Brom > > > wrote: > > > > > 2017-11-01 13:49 GMT+01:00 Andrew Z : > > > > 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 > > > > > Have you tried > > plt.show(block=False) > ? > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: matplot plot hangs
On Wednesday, November 1, 2017 at 6:30:27 PM UTC-4, Andrew Z wrote: > nope. it doesnt: > > I added print-s after each line and that produced: > [az@hp src]$ cat ./main1.py > import matplotlib.pyplot as plt > print("imported") > plt.plot([1,2,4,1]) > print("plot is done") > plt.show() > print("show is done") > > [az@hp src]$ python3.5 ./main1.py > imported > ^C^Z > [1]+ Stopped python3.5 ./main1.py > > > On Wed, Nov 1, 2017 at 9:31 AM, Vlastimil Brom> wrote: > > > 2017-11-01 13:49 GMT+01:00 Andrew Z : > > > 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 > > Have you tried plt.show(block=False) ? -- https://mail.python.org/mailman/listinfo/python-list
Re: matplot plot hangs
nope. it doesnt: I added print-s after each line and that produced: [az@hp src]$ cat ./main1.py import matplotlib.pyplot as plt print("imported") plt.plot([1,2,4,1]) print("plot is done") plt.show() print("show is done") [az@hp src]$ python3.5 ./main1.py imported ^C^Z [1]+ Stopped python3.5 ./main1.py On Wed, Nov 1, 2017 at 9:31 AM, Vlastimil Bromwrote: > 2017-11-01 13:49 GMT+01:00 Andrew Z : > > 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 > -- https://mail.python.org/mailman/listinfo/python-list
Re: matplot plot hangs
2017-11-01 13:49 GMT+01:00 Andrew Z: > 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
Re: matplot plot hangs
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 -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: matplot plot hangs
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 -- https://mail.python.org/mailman/listinfo/python-list
Re: matplot plot hangs
Stefan, I intentionally tried to use the qt backend that i do not have. I wanted to check i the switch was working (or not). All i want at this point is to use (seemed to be default) tkagg. On Oct 31, 2017 20:15, "Stefan Ram"wrote: > Andrew Z writes: > >ImportError: *No module named 'PyQt4'* > > Matplotlib requires a large number of dependencies, > like »NumPy«, »dateutil«, »libpng«, or »pytz«. > > There are also some capabilities provided by optional > backends which have their own dependencies. > > If one would like to use the »Qt4Agg« backend, one would > also need to have »PyQt4« installed. > > Some Python distributions might already contain many > dependencies. > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list