473,805 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "interactiv e : 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 2422
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 "interactiv e : 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
4159
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
6676
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 recent call last): File "gcToCsv.py", line 5, in ? File "plot_output.pyc", line 1, in ? File "pylab.pyc", line 1, in ?
0
1576
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 for NumPy 0.9.5 and Matplotlib 0.87.1, I get this error message: >>> import pylab as p Traceback (most recent call last): File "<pyshell#4>", line 1, in ? import pylab as p File "C:\Python24\Lib\site-packages\pylab.py", line 1, in ?
2
4858
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 containing the frozen executable and other libs to a new machine, I get the following error: Traceback (most recent call last): File "/home/fccoelho/Downloads/cx_Freeze-3.0.2/initscripts/Console.py",
8
5843
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, color='r', yerr=womenStd) File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 1641, in bar ret = gca().bar(*args, **kwargs)
0
1942
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 want to be able to create a wx.Panel that contains an axis for plotting. Around it i want other panels containing various settings, buttons etc. to control the plot. So far I can't even get the program to actually show a plot in a panel.
4
3356
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 on the matplotlib mailing list, but I have a hard enough time browsing sourceforge's achives (frequent internal server errors). Here is some output:
4
9694
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 I attempt to run the exe created. In searching the web, it appears this is an issue when others tried to use py2exe as well. Unfortunately, the few hits I saw doesn't include enough details to inspire me as to what I should be doing in my
0
4336
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 for this purpose but every time I try to make this exe using a setup file I get these errors. Final.py is my python code. Traceback (most recent call last): File "Final.py", line 5, in <module> File "pylab.pyc", line 1, in <module> File...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10107
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3846
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.