Pythonw crashes if I try to plot Complex data points
![](https://secure.gravatar.com/avatar/e7d8c9991030f8bf44dc4402a7a09023.jpg?s=120&d=mm&r=g)
Whenever I try to plot complex data using either plt or gplt from any pyhton shell(Python,PythonWin,IDLE,PyCrust). windows reports that pythonw has crashed. I know that it's a bit unfair to ask the plot routines to plot complex data but I would expect an error, not python to crash. I'm running the latest SciPy release on Windows XP. Example code below crashes.
from scipy import * a = arange(1,10,0.2) b = a + 2.j b array([ 1. +2.j, 1.2+2.j, 1.4+2.j, 1.6+2.j, 1.8+2.j, 2. +2.j, 2.2+2.j, 2.4+2.j, 2.6+2.j, 2.8+2.j, 3. +2.j, 3.2+2.j, 3.4+2.j, 3.6+2.j, 3.8+2.j, 4. +2.j, 4.2+2.j, 4.4+2.j, 4.6+2.j, 4.8+2.j, 5. +2.j, 5.2+2.j, 5.4+2.j, 5.6+2.j, 5.8+2.j, 6. +2.j, 6.2+2.j, 6.4+2.j, 6.6+2.j, 6.8+2.j, 7. +2.j, 7.2+2.j, 7.4+2.j, 7.6+2.j, 7.8+2.j, 8. +2.j, 8.2+2.j, 8.4+2.j, 8.6+2.j, 8.8+2.j, 9. +2.j, 9.2+2.j, 9.4+2.j, 9.6+2.j, 9.8+2.j]) gplt.plot(b)
At this point python\pythonw crashes with the following error "python.exe has encountered a problem and needs to close. We are sorry for the inconvenience." If anyone can help me resolve this then I would greatly appreciate it. _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger
![](https://secure.gravatar.com/avatar/a91ccdec83103203980a03c9311b7876.jpg?s=120&d=mm&r=g)
from scipy import * a = arange(1,10,0.2) b = a + 2.j b All works OK.
gplt.plot(b) Crashes for me too... However, you forgot to tell scipy to import gplt. In any case it doesn't help anyway.
Try this from scipy import * from scipy import plt a = arange(1,10,0.2) b = a + 2.j plt.plot(b) This snippet works fine for me. John
participants (2)
-
Hetal Patel
-
John Byrnes