because that might be counterproductive for the debugging process. You
can run "db events" to do a loop iteration to get the figures updated.
this automatically.
Post by j***@web.deI have python 3.6.5 installed and try to use matplotlib with pyqt4 in
debug mode with interactive mode on.
import matplotlib.pyplot as plt
plt.ion()
fig = plt.figure()
plt.plot(training_data[0,:])
plt.plot(training_data[1,:])
# plt.show()
If I run the whole script everything works fine, but inside the debug
mode (using a breakpoint) and empty loading and not responding figure
pops up that is crashing python when I try to close it.
Meanwhile I can still use the integrated python shell at the current
breakpoint.
Currently I changed to TK, so the figures won't show up at all during
debugging but afterwards, however it would be nice to be able to plot
things at a certain breakpoint for debugging issues.
Any suggestions?
Jonas
Well, conda resolved dependencies, but pyqt is an *optional*
dependency for mpl, since it supports multiple GUI backends. So
this is a rather special situation. I hope it will be fixed soon
when MPL support pyqt5.
-Almar
*From: *'blue2studio' via Pyzo <javascript:>
*Sent: *05 December 2016 20:08
*To: *Pyzo <javascript:>
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes
crash"Pythonhasstoppedworking"
Almar,
Yes....that solves my problem thanks...
Maybe that dependency should be checked...
Does Pyzo include anything that can do dependency management?
What do people use for Pyqt5 for plotting?
Bob
IIRC Matplotlib does not work with Pyqt5 yet. If youâre using
conda, its easy to move to pyqt4 using âconda install pyqt=4â.
My guess is that will make everything work fine. If you donât
care about interactive mode (I.e. its fine if the call to
plt.show() blocks) then you can disable GUI integration all
together.
In the shell configuration dialog you can specify a few things
about the shell, like what interpreter is used the GUI toolkit
to use, and whether IPython should be used.
I hope this gets you going,
 Almar
*From: *'blue2studio' via Pyzo
*Sent: *03 December 2016 17:01
*To: *Pyzo
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes crash
"Pythonhasstoppedworking"
Almar,
i'm using...
Python 3.5.2 |Anaconda custom (32-bit)| (default, Jul 5 2016,
11:45:57) on Windows (32 bits).
This is the Pyzo interpreter with integrated event loop for PYQT5.
Using IPython 5.1.0 -- An enhanced Interactive Python.
I tried to install PYQT4 rather than PYQT5 but not sure how to
do that with pip.
This could also be an IPython 5.1.0 bug...MPL code works fine
from command>Â py <code>.py
I just need to add the plt.show() command and it works fine
Is there some way to run my code from another shell
Or How do I back out of Ipython?   this bug seems to have
something to do with interactive mode
Bob
Pyzo can integrate a variety of GUI toolkit so that they
can be used interactively (i.e. events get processed, but
the shell keeps working too). Matplotlib supports a
variety of GUI toolkits to render the figure in. The one
that MPL is using should match with what Pyzo is using. If
they use different ones, things can break hard sometimes.
Mpl tends to default to PyQt4. Thatâs why I asked about
what GUI toolkit is integrated in Pyzo. You can tell by
what the shell prints out when it starts.
Regards,
 Almar
*From: *'blue2studio' via Pyzo
*Sent: *02 December 2016 21:43
*To: *Pyzo
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes
crash "Python hasstoppedworking"
The following works without pyzo
from windows>Â Â py tlab2.py
import matplotlib.pyplot as plt
import numpy as np
#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()
Note: I had to remove plt.ion() and put back plt.show()
When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo
Bob
This looks like it could be a clash between different
GUI toolkits. Is there any GUI toolkit integrated?
I.e. does the shell say âThis is the Pyzo interpreter
with integrated event loop for XXâ? If youâve not
already done so, you can try doing `conda install pyqt=4`.
Regards,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *01 December 2016 19:49
*To: *Pyzo
*Subject: *[Pyzo] matplotlib plots but mouse causes
crash "Python has stoppedworking"
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no
luck.
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()
The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.
I'm new, but I'm a newly retired software developer,
C, C++, Python, etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a
new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri
expert system.
Bob
--
You received this message because you are subscribed
to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving
emails from it, send an email to
For more options, visit
https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to
the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the
Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.