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 <javascript:>
> *Sent: *01 December 2016 19:49
> *To: *Pyzo <javascript:>
> *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 <javascript:>.
> 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.

Reply via email to