473,545 Members | 2,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a better interactive plotter then pylab?

List:

I'm trying to us pylab to see what I'm doing with some DSP algorithms,
in case my posts about convolution and ffts weren't giving it away.

I've been using pylab's plot function, but I'm finding it a bit
cumbersome.

It works, but if I switch from the interactive window to the plot window
and back, the plot window gets trashed.

Is there a better alternative for interactive use?

Thanks
Charles

Jul 19 '05 #1
2 7798
>>>>> "Charles" == Charles Krug <cd****@worldne t.att.net> writes:

Charles> List: I'm trying to us pylab to see what I'm doing with
Charles> some DSP algorithms, in case my posts about convolution
Charles> and ffts weren't giving it away.

Charles> I've been using pylab's plot function, but I'm finding it
Charles> a bit cumbersome.

Charles> It works, but if I switch from the interactive window to
Charles> the plot window and back, the plot window gets trashed.

Charles> Is there a better alternative for interactive use?

You are probably not using pylab interactive mode properly.
matplotlib has several GUI backends (gtk, tk, qt, etc...). Most GUIs
take control with their mainloop and prevent further interaction.
From what you describe, I'm pretty sure you haven't setup your configuration properly for interactive use. Fortunately, there are a
couple of solutions.

For the standard python shell, you need to use the TkAgg backend.
Tkinter is the only python GUI that plays nicely with the standard
python shell. You will need to set "backend : TkAgg" and
"interactiv e : True" in the matplotlib rc file. See
http://matplotlib.sf.net/interactive.html for details and
http://matplotlib.sf.net/.matplotlibrc for information on the
configuration file.

If you want to use another GUI backend, eg GTKAgg (the default on
linux and also the fastest backend), you need to use a custom python
interpreter which runs the GUI in a thread. The best choice here is
to use ipython (http://ipython.scipy.org) with the -pylab option.
ipython is aware of matplotlib and its rc file, and will read the rc
file, set the interactive mode, detect the GUI backend, and make the
proper threading calls. Basically it *just works*. If you are on
linux, it's an easy install (sudo python setup.py install). On
windows it's a bit harder, and you may want to look at the 1069
release candidate of enthought python at
http://www.enthought.com/downloads/d...s.htm#download, which comes
with ipython and matplotlib and lots of other goodies. Again, you'll
need to start ipythhon with
ipython -pylab


In addition to the links above, see also
http://matplotlib.sf.net/faq.html#SHOW.

Hope this helps,
JDH
Jul 19 '05 #2
On Wed, 27 Apr 2005 20:56:07 -0500, John Hunter
<jd******@ace.b sd.uchicago.edu > wrote:
>> "Charles" == Charles Krug <cd****@worldne t.att.net> writes:


Charles> List: I'm trying to us pylab to see what I'm doing with
Charles> some DSP algorithms, in case my posts about convolution
Charles> and ffts weren't giving it away.

Charles> I've been using pylab's plot function, but I'm finding it
Charles> a bit cumbersome.

Charles> It works, but if I switch from the interactive window to
Charles> the plot window and back, the plot window gets trashed.

Charles> Is there a better alternative for interactive use?

You are probably not using pylab interactive mode properly.
matplotlib has several GUI backends (gtk, tk, qt, etc...). Most GUIs
take control with their mainloop and prevent further interaction.
From what you describe, I'm pretty sure you haven't setup your

configuration properly for interactive use. Fortunately, there are a
couple of solutions.

For the standard python shell, you need to use the TkAgg backend.
Tkinter is the only python GUI that plays nicely with the standard
python shell. You will need to set "backend : TkAgg" and
"interactiv e : True" in the matplotlib rc file. See
http://matplotlib.sf.net/interactive.html for details and
http://matplotlib.sf.net/.matplotlibrc for information on the
configuration file.


Those are already set. I'm taking a look at ipython now.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3680
by: Liberal | last post by:
I am looking for the simplest forum, bbs script which has those features? new messages will be displayed only after the administrator reviewed allow users post without signing up display the newest message first. prefer perl, but php is ok.
1
2679
by: jean.rossier | last post by:
Hello All, I am facing a problem while importing pylab library(in a .py program file) via web browser however the same program works when I execute it from the command prompt. my configuration : Fedora Core 3 Apache 2.0
3
4034
by: Dr. Colombes | last post by:
On my home laptop computer, I'm trying to install the appropriate modules so that Python version 2.3.3 and IDLE version 1.0.2 (with an "import matplotlib.matlab" statement) can produce nice MatLab-like plots. I have a matplotlib.matlab-capable Python set-up running OK on my office desktop, which I obtained after downloading and installing...
6
17675
by: googlinggoogler | last post by:
Hiya, I've got a PIC microcontroller reading me humidity data via rs232, this is in ASCII format. I can view this data easily using hyperterminal or pyserial and convert it to its value (relative humidty with ord(input)) But what im trying to do is plot the data in real time, ideally with pylab - as it looks simple to use and simple is...
2
1805
by: Gary Wessle | last post by:
Hi I use debian/testing linux Linux debian/testing 2.6.15-1-686 I found some duplicate files in my system, I don't if the are both needed, should I delete one of the groups below and which one? -rw-r--r-- 1 root root 80375 2006-01-24 00:28 /usr/lib/python2.3/site-packages/matplotlib/pylab.py -rw-r--r-- 1 root root 96202 2006-05-07 13:44...
2
2710
by: timw.google | last post by:
Hi all. I installed matplotlib 0.87.3 under Python 2.4 on both Linux (FC3) and Windows XP Pro. On the linux install, I can import pylab, but when I try to do the same thing on the Windows installation, I get >>> from pylab import * Traceback (most recent call last): File "<pyshell#7>", line 1, in -toplevel-
0
1957
by: ehenlin | last post by:
Hi, How to make pylab work together with py2exe? Have anyone managed to build a stand alone exe with pylab package? I have made a small test script but that does not work. setup.py ------------
1
1180
by: Jacob Rael | last post by:
Hello, I use an interactive simulator/data plotter called ocean. I get really frustrated using it because it does not have basic readline capabilities like ctrl-a for beginning of line and ctrl-k to kill the rest of the line. I was thinking this might be easy to add with Python. Do something like start python and then kick off the ocean...
2
2179
by: sydneytroz | last post by:
I am writing a program to simulate a double displacement reaction getting to equilibrium, but I am having some trouble graphing the particles' concentrations. It seems that it's only possible to pan and zoom the graph once the program exits (when running it from IDLE), but I don't want to have to kill the sim every time I want to view the graph...
0
7396
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...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
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...
1
7413
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...
0
7751
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...
1
5323
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4943
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
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...
1
1012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.