473,405 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

matplotlib problem

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
1 2390
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Noe | last post by:
Hello, I have a problem with finance_work2.py provided in the documentation. I can't find the helpers module : ImportError: No module named helpers Someone could help me? thanks in advance.
2
by: scott | last post by:
I am trying to convert a python app that uses matplotlib to a standalone executable using py2exe. After running py2exe and executing my app I get the following stack trace: Traceback (most...
0
by: sturlamolden | last post by:
Recently, I have been trying to test Python as an alternative to Matlab. I have problems getting matplotlib to work on Windows (ActivePython 2.4.2). After installing the precompiled binary packages...
2
by: Flavio | last post by:
I am trying to freeze an application which imports matplotlib. It all works fine on the machine where it was frozen. The executable runs without a glitch. But when I move the directory...
8
by: Andi Clemens | last post by:
Hi, everytime I try to plot a bar with matplotlib I get the following error message: Traceback (most recent call last): File "bar_stacked.py", line 13, in ? p1 = bar(ind, menMeans, width,...
0
by: Soren | last post by:
Hi, I'm trying to create a small GUI program where I can do plots using Matplotlib. I've been trying to borrow code from the examples at the matplotlib website, but I can't get it to work. I...
4
by: Bill Jackson | last post by:
Hi, I'm having some trouble plotting with the following matplotlibrc: text.usetex : True I tried clearing the cache files under ~/.matplotlib, but this did not help the problem. I'd post...
4
by: John Henry | last post by:
Has anybody been able to create an exe of their python applications involving matplotlib using pyinstall (ver 1.3)? I am getting a: RuntimeError: Could not find the matplotlib data files when...
0
by: PamMish1982 | last post by:
Hi all, I have recently started using Python and I am trying to make a GUI out of Tkinter. I am using matplotlib for the graphic purposes. I have to make a exe file from this code. I use py2exe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.