|
From: Giorgio L. <gio...@ch...> - 2006-12-21 10:04:13
|
I've searched a bit in the FAQ, since in the last days I'm struggling with the show and close command. I've got a function that calculate values to plot. I calculate plot, use show command and everything goes fine. I close the figure recalculate values and then replot and everything freezes because the show command seems still active. I've tried to start IDLE using -n option but no solution. the plots freezes and I loose all calculations, and then I have to restart. reload etc.. I tried also to turn interactive off but no way of solving. I'm using WIN XP python 2.5 numpy 1.01 scipy 0.52 matplotlib 0.87.7 and I don't want to come back to matlab :) Since in matlab it's very common to calculate something, recalculate, plot etc. etc. Any help would be very appreciated. If needed I can post function and file I'm using in .tar Giorgio |
|
From: Darren D. <dd...@co...> - 2006-12-21 11:03:55
|
On Thursday 21 December 2006 5:04 am, Giorgio Luciano wrote: > I've searched a bit in the FAQ, since in the last days I'm struggling > with the show and close command. > I've got a function that calculate values to plot. I calculate plot, use > show command and everything goes fine. > I close the figure recalculate values and then replot and everything > freezes because the show command seems still active. > I've tried to start IDLE using -n option but no solution. the plots > freezes and I loose all calculations, and then I have to restart. reload > etc.. > I tried also to turn interactive off but no way of solving. > > I'm using WIN XP > python 2.5 > numpy 1.01 > scipy 0.52 > matplotlib 0.87.7 > > and I don't want to come back to matlab :) Since in matlab it's very > common to calculate something, recalculate, plot etc. etc. Try setting interactive : True in your matplotlibrc file, and restart your idle -n session. Then you shouldn't even need to use the show() command, the behavior will be very similar to matlab. Darren |
|
From: Giorgio L. <gio...@ch...> - 2006-12-21 13:16:41
|
I've created a shortcut in the desktop to start idle-n
unsing C:\Python25\Lib\idlelib\idle.bat -n
then I changed matplotlibrc and set interactive: True
then started Idle, loaded the module and run.
At first I had this error message...
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\prove\demo.py", line 1, in <module>
from pylab import *
File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 220, in
<module>
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py",
line 23, in pylab_setup
globals(),locals(),[backend_name])
File
"C:\Python25\lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 19, in <module>
import wx
ImportError: No module named wx
naturally I installed WX wxPython2.8-win32-unicode-2.8.0.1-py25
and restart the demo. plots load faster (and I needed to use show). but
then I recalculated and restart and everything crashed again :(
I'm frustrated .. any hints :(
And sorry for bother I dont' want to get back to matlab
Giorgio
|
|
From: Giorgio L. <gio...@ch...> - 2006-12-21 13:27:30
|
It worked !!!! I dont' know why , probably i dind't restart correctly after changing config but with the setting you suggest it went fine. THANKS !! You SAVED my DAY !! Giorgio |
|
From: Giorgio L. <gio...@ch...> - 2007-01-02 08:34:53
|
I've seen that it also works with WxAgg version 2.8.0.1 for python 2.5 I hope this information can be useful Giorgio |
|
From: Darren D. <dd...@co...> - 2006-12-21 13:45:43
|
On Thursday 21 December 2006 08:16, Giorgio Luciano wrote: > I've created a shortcut in the desktop to start idle-n > unsing C:\Python25\Lib\idlelib\idle.bat -n > then I changed matplotlibrc and set interactive: True > then started Idle, loaded the module and run. > At first I had this error message... > > Traceback (most recent call last): > =A0 File "C:\Python25\Lib\site-packages\prove\demo.py", line 1, in <modul= e> > =A0 =A0 from pylab import * > =A0 File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module> > =A0 =A0 from matplotlib.pylab import * > =A0 File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 220, in > <module> > =A0 =A0 new_figure_manager, draw_if_interactive, show =3D pylab_setup() > =A0 File "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py", > line 23, in pylab_setup > =A0 =A0 globals(),locals(),[backend_name]) > =A0 File > "C:\Python25\lib\site-packages\matplotlib\backends\backend_wxagg.py", > line 19, in <module> > =A0 =A0 import wx > ImportError: No module named wx > > naturally I installed WX wxPython2.8-win32-unicode-2.8.0.1-py25 > > and restart the demo. plots load faster (and I needed to use show). but > then I recalculated and restart and everything crashed again :( > I'm frustrated .. any hints :( > And sorry for bother I dont' want to get back to matlab I see. When you use idle, you should set backend : TkAgg in your rc setting= s.=20 The reason for this is discussed in the matplotlib users manual, see=20 http://matplotlib.sourceforge.net/users_guide_0.87.7.pdf. Darren |