Re: [Pyzo] matplotlib plots but mouse causes crash "Python hasstoppedworking"

2016-12-03 Thread 'blue2studio' via Pyzo
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 .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

On Saturday, December 3, 2016 at 3:17:54 AM UTC-8, Almar Klein wrote:
>
> 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
>
>
>
> On Friday, December 2, 2016 at 2:31:28 AM UTC-8, Almar Klein wrote:
>
> 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 pyzo+uns...@googlegroups.com.
> For more options, visit 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 an 
> email to pyzo+uns...@googlegroups.com .
> For more options, visit 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 an email 
to pyzo+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [Pyzo] matplotlib plots but mouse causes crash "Python hasstoppedworking"

2016-12-03 Thread almar.klein
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


On Friday, December 2, 2016 at 2:31:28 AM UTC-8, Almar Klein wrote:
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 pyzo+uns...@googlegroups.com.
For more options, visit 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 an email 
to pyzo+unsubscr...@googlegroups.com.
For more options, visit 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 an email 
to pyzo+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.