Re: [Matplotlib-users] matplotlib threadsafe?

2008-03-20 Thread Eric Firing
> Out of interest, how does one tell MPL to "start a new figure and forget > everything that's gone before"? You can minimize the amount of package and module-level state information by using the oo interface: see examples/agg_oo.py. If you change any rcParams dictionary entries, typically us

Re: [Matplotlib-users] Install problem on Leopard

2008-03-20 Thread Chris.Barker
Charlie Moad wrote: > I agree you are not using a universal build of python to compile > matplotlib. You cannot pass in the "-arch i386 -arch ppc" flags. > Only pass the architecture of your computer. Actually, I think the OP IS using a universal python, thus both flags -- he isn't manually pa

Re: [Matplotlib-users] plotting filled lines with missing data?

2008-03-20 Thread C M
Pierre, I was interested in learning more about TimeSeries, and had a few questions... Your data is indexed in time, right ? Your x-axis is a date object ? Just to be clear on the language: "indexed in time" means data for which the x-axis is a series of dates, correct? But I am not sure what

Re: [Matplotlib-users] Install problem on Leopard

2008-03-20 Thread Charlie Moad
I agree you are not using a universal build of python to compile matplotlib. You cannot pass in the "-arch i386 -arch ppc" flags. Only pass the architecture of your computer. - Charlie On Thu, Mar 20, 2008 at 7:13 PM, Christopher Barker <[EMAIL PROTECTED]> wrote: > Andrew Charles wrote: > > Com

Re: [Matplotlib-users] plotting filled lines with missing data?

2008-03-20 Thread Pierre GM
Chris, My 2c: Your data is indexed in time, right ? Your x-axis is a date object ? Then use scikits.timeseries http://scipy.org/scipy/scikits/wiki/TimeSeries That package was designed to take missing dates/data into account. That way, you can plot your data with the gaps already taken into accoun

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Christopher Brown
Hi Brook, FG> Can you give me a simple example to show how to set the figure's FG> interactive property to on? I appreciate! >>> import pylab >>> pylab.ion() -- Chris - This SF.net email is sponsored by: Microsoft Defy a

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Fans Gnu
Can you give me a simple example to show how to set the figure's interactive property to on? I appreciate!--Brook--- On Fri, 3/21/08, Christopher Brown <[EMAIL PROTECTED]> wrote:From: Christopher Brown <[EMAIL PROTECTED]>Subject: Re: [Matplotlib-users] How to close the figure after show it?To: [EMA

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Christopher Brown
Hi, > Hi Mike,thanks for your reply. I tried f=figure() and pylab.close(f), > but the figure can not be closed automatically. Seems that > time.sleep(3) doesn't be called until I close the figure manually. Maybe try setting the figure's interactive property to on? -- Chris ---

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Fans Gnu
Hi Mike,thanks for your reply. I tried f=figure() and pylab.close(f), but the figure can not be closed automatically. Seems that time.sleep(3) doesn't be called until I close the figure manually. The test code is attached below.Thanks,Brook ==from pylab import *from

Re: [Matplotlib-users] Install problem on Leopard

2008-03-20 Thread Christopher Barker
Andrew Charles wrote: > Compiling Matplotlib from source, or easy_installing the egg >>From the egg: > ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for hmm -- odd, I wouldn't think the egg should be linked against what looks like a macports libJPEG -- are you sure it isn't

Re: [Matplotlib-users] compiling from svn on windows

2008-03-20 Thread Chris Withers
Michael Droettboom wrote: >> That's cool'n'all, but when is svn going to make it into a Windows >> binary release? ;-) >> > I suspect your question is somewhat rhetorical, but... it will probably > be a while ;) Why is that? Who cranks out the binary releases on Windows and what compiler d

Re: [Matplotlib-users] bar chart with dates on x-axis blows up

2008-03-20 Thread Chris Withers
[re-adding in the list] Eric Firing wrote: > It looks like you have hit a bug that has been fixed. I don't know when > it was fixed, but your example works with svn. As I said elsewhere, with all the fixes, maybe it's time for a new release? ;-) > Also, you can call bar repeatedly; I think it

Re: [Matplotlib-users] from pylab import nx?

2008-03-20 Thread Chris Withers
Eric Firing wrote: > If you are referring to scripts in the matplotlib/examples/ subdirectory > then you must have a version in which some of those scripts had not been > brought up to date with the rest of matplotlib. You should turn them into unit tests as well as examples. I'm about to try a

Re: [Matplotlib-users] matplotlib threadsafe?

2008-03-20 Thread Chris Withers
Eric Firing wrote: > In general, I don't think mpl is threadsafe at all; it uses global > variables, such as all the rc parameters, that could easily be modified > by one thread while being used by another. Yep, I guessed as much, BFL it is then ;-) > I think that great care > would be needed

Re: [Matplotlib-users] matplotlib threadsafe?

2008-03-20 Thread Chris Withers
Michael Droettboom wrote: > At least the Agg backend *looks* to be reasonably threadsafe -- there > are no obvious gotchas like global variables etc. Note, though, that > multithreading may not gain much in the way of performance since the > global interpreter lock is never released around long

Re: [Matplotlib-users] plotting with missing data?

2008-03-20 Thread Chris Withers
Giorgio F. Gilestro wrote: > > import numpy as np > a = ['','','',1.1,2.2] > mask_a = [i == '' for i in a] > b = np.ma.MaskedArray(a, mask=mask_a) Not very efficient, though, is it? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.

Re: [Matplotlib-users] plotting filled lines with missing data?

2008-03-20 Thread Chris Withers
Eric Firing wrote: > Both with respect to documentation and functionality, what you are > encountering is the historical aspect of masked arrays as a tacked-on > part of python numeric packages, and of matplotlib. *sigh* I feel lucky ;-) > Support and > integration are improving, but still far

[Matplotlib-users] Install problem on Leopard

2008-03-20 Thread Andrew Charles
Hi Folks, I'm having some trouble installing Matplotlib on a Macbook pro running Leopard. I installed macpython 2.5.2, and I have numpy and scipy installed from source for the 2.5.2 installation. Compiling Matplotlib from source, or easy_installing the egg (matplotlib-0.91.2-py2.5-macosx-10.3-fa

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Michael Hearne
I think f = figure(); ... pylab.close(f); should work. --Mike On Mar 20, 2008, at 2:14 PM, Fans Gnu wrote: Hi All, I am using matplotlab to plot some figure. I would like to close the figure after show it 5 sec. My code is pasted below. However, I can not close the figure automatically.

[Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Fans Gnu
Hi All,I am using matplotlab to plot some figure. I would like to close the figure after show it 5 sec. My code is pasted below. However, I can not close the figure automatically.  Can anyone help me to fix it?Thanks,Brook==import timefrom pylab import *from matplotlib impor

Re: [Matplotlib-users] Specifiying Axes and Grid Lines

2008-03-20 Thread Rich Shepard
On Thu, 20 Mar 2008, Eric Firing wrote: > Sorry, but those options are not presently available at the rc level. Mpl > simply does not have easy support for that style of plot. It is on the wish > list. Eric, I'm surprised because this is quite common ... at least in my needs over the years

Re: [Matplotlib-users] Specifiying Axes and Grid Lines

2008-03-20 Thread Eric Firing
Rich Shepard wrote: >I've read the users guide and API (both as pdf and on the web site), and > do not see how to configure the axes for only left and bottom, and the grid > for only horizontal lines. > >The axes(rect, w) is used to specify the position of the left and bottom > lines plus

Re: [Matplotlib-users] Why Is This Code Failing? -- FIXED

2008-03-20 Thread Rich Shepard
On Thu, 20 Mar 2008, Rich Shepard wrote: > Clue appreciated. Bingo! Found the problem. The plotting functions are in a separate module, and each was developed interactively using ipython, then copied into the module. As a result, each function retained the show() command at the end, and

[Matplotlib-users] Specifiying Axes and Grid Lines

2008-03-20 Thread Rich Shepard
I've read the users guide and API (both as pdf and on the web site), and do not see how to configure the axes for only left and bottom, and the grid for only horizontal lines. The axes(rect, w) is used to specify the position of the left and bottom lines plus the width and height of the box.

Re: [Matplotlib-users] Why Is This Code Failing?

2008-03-20 Thread Rich Shepard
On Wed, 19 Mar 2008, Rich Shepard wrote: > When it runs in the test script the first curve is plotted in a > matplotlib window and the program pauses until I close that window by > clicking on the upper right button on the frame. Then this traceback is > displayed: Update: I stripped the

Re: [Matplotlib-users] Efficient scatter() w/ markers from plot()?

2008-03-20 Thread Ted Drain
Thanks! I had originally just tried it (ignoring the docs) but my plot just showed dots instead of markers for both 'x' and '+'. Then I read the docs which seemed to indicate they wouldn't work. Late last night I was digging through axes.py and noticed that they should be supported (and I found

Re: [Matplotlib-users] Efficient scatter() w/ markers from plot()?

2008-03-20 Thread Manuel Metz
Ted Drain wrote: > I need to efficiently plot a set of x,y points where each point has a > different color. I tried multiple calls to plot() with a single point each > but that is way too slow. I switched to using scatter() and passing in a > list of colors which works great. However, I'd really