0

Is there any way to add a matplotlib function call inside a Python loop to make the next plot of the loop be drawn only after a key press? I'm not talking about interaction of the user with the console (terminal), I mean, given that the current situation is: the first plot is shown, and the next plot will be drawn only after the user closes the canvas, so the code generates the next plot, so, since matplotlib deals with key press event functions, isn't there a way to make the python loop code obey a key press event and then the next plot is shown automatically with no need to close the window (current canvas), to show the next plot?

I'm asking it in general terms, but if any code examples are needed, let me know and I'll post it with more detail.

E. AMARAL
  • 949
  • 1
  • 10
  • 20
  • 1
    See e.g. [this question](https://stackoverflow.com/questions/46727041/display-changing-matrix-on-every-cycle-with-user-input/46727328#46727328) or [this one](https://stackoverflow.com/questions/41545664/view-3-dimensional-numpy-array-in-matplotlib-and-taking-arguments-from-keyboard/41552601#41552601). – ImportanceOfBeingErnest Jul 26 '18 at 18:14
  • Thank you! That will be very helpful. – E. AMARAL Jul 27 '18 at 11:03

0 Answers0