472,958 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 7764
>>>>> "Charles" == Charles Krug <cd****@worldnet.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
"interactive : 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.bsd.uchicago.edu> wrote:
>> "Charles" == Charles Krug <cd****@worldnet.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
"interactive : 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
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...
1
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...
3
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...
6
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...
2
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...
2
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...
0
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
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...
2
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.