← Back to team overview

yade-users team mailing list archive

Pause on plot windows during a script



Linked with https://bugs.launchpad.net/yade/+bug/606220 (?, these two things appear for me at the same time), the successive plot windows displayed by my script disappeared as soon as they appeared - which was annoying.

I tried different things, and found one efficient, but comments are welcome (all the following lines are to be typed after plot.plot() ):

- pylab.show() (with an import pylab) works only one time (and not second time it is called and so on...) - "pause" stops the script while windows are displayed, but how to continue ?? - time.sleep(Float number of seconds you want to wait) (with an import time) does a pause, but without that plot windows are being displayed...

- raw_input() gives what is requested. We can watch at the windows, and the script continues as soon as the user types "Return"

During my searchs, the link between the matplotlib/pylab module of python, and the "plot" one of yade, (§ https://www.yade-dem.org/sphinx/user.html#controlling-line-properties) was not so clear.


PS @ Janek : thanks for the explanations to the bug, I missed these infos.

Jérôme Duriez
ATER Iut 1 Grenoble, département GMP - Laboratoire 3S-R (ne pas laisser de messages sur le répondeur)