By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,551 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,551 IT Pros & Developers. It's quick & easy.

matplotlib problem

P: n/a
I've got a question regarding matplotlib. I use the command:
pylab.plot(...)
to create a graph.
Then, the execution of the code stops after the line:
pylab.show()
which is off course the last line of my code.

My problem is that I have to close the figure window before in order
to finish the execution of my code.
I'd like to be able to launch my program other times with different
parameters without having to close the figure windows before each
launch.
Just so you know, I'm using TkAgg backend and the SciTE editor.

Following the answer I was given in the thread:
http://groups.google.com/group/comp....39f2db9da55430
I set "interactive : True" in matplotlibrc.
I also tried the other things I had been advised to do but I still
have the same problem.

Any other idea ?

Thanks,

Cédric

May 10 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 10 Mai, 10:31, redcic <cedric.lou...@gmail.comwrote:
I've got a question regarding matplotlib. I use the command:
pylab.plot(...)
to create a graph.
Then, the execution of the code stops after the line:
pylab.show()
which is off course the last line of my code.

My problem is that I have to close the figure window before in order
to finish the execution of my code.
I'd like to be able to launch my program other times with different
parameters without having to close the figure windows before each
launch.
Just so you know, I'm using TkAgg backend and the SciTE editor.

Following the answer I was given in the thread:http://groups.google.com/group/comp....thread/thread/...
I set "interactive : True" in matplotlibrc.
I also tried the other things I had been advised to do but I still
have the same problem.

Any other idea ?

Thanks,

Cédric
Use ipython (http://ipython.scipy.org/moin/) :

<snip>

IPython accepts the special option -pylab (Sec. 5.2). This configures
it to support matplotlib, honoring the settings in the .matplotlibrc
file. IPython will detect the user's choice of matplotlib GUI backend,
and automatically select the proper threading model to prevent
blocking. It also sets matplotlib in interactive mode and modifies
%run slightly, so that any matplotlib-based script can be executed
using %run and the final show() command does not block the interactive
shell.

</snip>

Steffen

May 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.