Re: [Matplotlib-users] Installing Matplotlib

2009-04-06 Thread brett . mcsweeney
A quick but not necessarily accurate answer: Don't use Python 2.6. Use Python 2.5. I don't think matplotlib has been 'certified' for 2.6 yet. I suggest (1) uninstall Python 2.6 and numpy for 2.6. (2) Install Python 2.5 and numpy for 2.5 (3) Install matplotlib for 2.5 Constantine 0

Re: [Matplotlib-users] quick numpy question

2009-03-17 Thread brett . mcsweeney
Use Python set and then convert to numpy array? Pablo Romero 18/03/2009 01:50 PM To cc Subject [Matplotlib-users] quick numpy question quick numpy-related question. I want to use numpy.arange() to create multiple arrays, and then I want to join these arrays (or individual elemen

Re: [Matplotlib-users] How to plot only points which lie in a certain range

2008-10-27 Thread brett . mcsweeney
You need to use the numpy 'where' functionality import numpy as np x, y, z = np.loadtxt("fileName.dat", unpack=True) # or similar # x, y and z are now numpy arrays and have built in functionality as follows: s = (z < 10.0) & (z**2 > 0.5) # or some other constraint. Produces an array 's' of

Re: [Matplotlib-users] MPL 0.91.2: bottom of xlabel chopped off

2008-08-12 Thread brett . mcsweeney
Is it just that the label too close to the border? "Warren Weckesser" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 13/08/2008 01:13 PM To matplotlib-users@lists.sourceforge.net cc Subject [Matplotlib-users] MPL 0.91.2: bottom of xlabel chopped off Hi, Sorry if this is in a FAQ some

Re: [Matplotlib-users] Curve fitting ...

2008-02-11 Thread brett . mcsweeney
I would recommend using "pylab.load" for reading the data. For example: x, y = pylab.load("filename", unpack=True) # with other options as required sa6113 <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 09/02/2008 07:34 PM To matplotlib-users@lists.sourceforge.net cc Subject [Matplotlib-

Re: [Matplotlib-users] drawing a box

2007-12-19 Thread brett . mcsweeney
A good reminder to check that site out. There is alsoTreeMap, which uses coloured rectangles. http://www.scipy.org/TreeMap Jessica Lu <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 20/12/2007 05:30 AM To cc Bryan Fodness <[EMAIL PROTECTED]>, matplotlib Subject Re: [Matplotlib-users] d

Re: [Matplotlib-users] continuous plotting..

2007-12-02 Thread brett . mcsweeney
always look the same. Best regards, Brett McSweeney ray sa <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 03/12/2007 09:50 AM To matplotlib-users@lists.sourceforge.net cc Subject [Matplotlib-users] continuous plotting.. Hello I am trying to use this application to plot a diagram

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread brett . mcsweeney
I didn't say infinite power, but infinite power density at the sine wave frequemcy. Being per Hz doesn't mean that one computes the PSD using a 1 Hz band! It means that one divides the power in the band by the width of the band, which can be anything one chooses. The formula for S(f) of a si

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread brett . mcsweeney
There is certainly differences (usually of a factor of PI) in the various definitions used for PSDs, but a simple sign wave has an infinite power density at the sine wave frequency. Are we agreed on that? Use of windowing will modify this comment somewhat (so it probably won't really go to inf

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread brett . mcsweeney
If you lower the resolution (ie increase nFFT) in your program you will see that the PSD does indeed increase. I think it may be on the way to infinity. Joseph Park <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 26/10/2007 10:05 AM To matplotlib-users@lists.sourceforge.net cc Subject Re:

[Matplotlib-users] Fw: PSD amplitudes

2007-10-25 Thread brett . mcsweeney
Are you sure that the answer should be zero? Shouldn't the PSD for a simple sine wave tend to infinity (depending on the resolution)? Joseph Park <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 26/10/2007 06:50 AM To matplotlib-users@lists.sourceforge.net cc Subject [Matplotlib-users] PSD

Re: [Matplotlib-users] Cumulative histogram

2007-06-19 Thread brett . mcsweeney
and some more... normHist, lower_edges = numpy.histogram(Hlist, bins=100, normed=True) binWidth = lower_edges[-1]/(len(lower_edges)-1) cumHist = normHist.cumsum()*binWidth pylab.plot(lower_edges+binWidth, cumHist) # use upper edge of bin Brett McSweeney/Broadmeadow/Goninan/AU 20/06/2007

Re: [Matplotlib-users] Cumulative histogram

2007-06-19 Thread brett . mcsweeney
some tweaking... binWidth = lower_edges[-1]/(len(lower_edges)-1) [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 20/06/2007 09:14 AM To Tommy Grav <[EMAIL PROTECTED]> cc [EMAIL PROTECTED], matplotlib-users@lists.sourceforge.net Subject Re: [Matplotlib-users] Cumulative histogram I don'

Re: [Matplotlib-users] Cumulative histogram

2007-06-19 Thread brett . mcsweeney
I don't know about easy, but here is a start: normHist, lower_edges = numpy.histogram(Hlist, bins=100, normed=True) binWidth = lower_edges[-1]/len(lower_edges) cumHist = normHist.cumsum()*binWidth pylab.plot(lower_edges+0.5*binWidth, cumHist) Needs some tweaking, no doubt. Tommy Grav <[EMAIL

Re: [Matplotlib-users] get_xlim() - where am I going wrong

2007-06-13 Thread brett . mcsweeney
Just as a general comment - perhaps not useful in your case - we have the same sort of requirement and find the periodogram facility (specgram) in pylab very useful for showing the change in PSD over time - highlighting resonances and how they vary in proportion to other functions of time (plot

Re: [Matplotlib-users] Handling LARGE data sets

2007-06-12 Thread brett . mcsweeney
Hello Andrew, Sorry for the delay, I have been on holidays. I wrote the code (such as it is - but the key line is adapted from the scipy web site). I should have put a copy of the BSD license at the front, I suppose, (would that be correct?) but it was never intended as more than a quick in-h

Re: [Matplotlib-users] Handling LARGE data sets

2007-05-30 Thread brett . mcsweeney
Hi Alan, I'm not speaking for anyone else, but as far as I'm concerned that code is public domain. Cheers, Brett. Alan G Isaac <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 31/05/2007 01:17 PM Please respond to [EMAIL PROTECTED] To Matplotlib Users cc Subject Re: [Matplotlib-users] Han

Re: [Matplotlib-users] Handling LARGE data sets

2007-05-30 Thread brett . mcsweeney
Hi Steve, This is also interest to us - although about 2 million data points is our maximum so far. Here is a decimating filter module based on the Savtsky-Golay method. Brett McSweeney steve george <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 31/05/2007 06:07 AM To Matplotlib

Re: [Matplotlib-users] Newbie. Memory useage question

2007-04-25 Thread brett . mcsweeney
Thanks John, that works perfectly. Best regards, Brett McSweeney On 4/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm producing series of plots (spectograms) in a program loop using imshow > and saving each plot to .png. Even though I close() each plot a

[Matplotlib-users] Newbie. Memory useage question

2007-04-23 Thread brett . mcsweeney
I'm producing series of plots (spectograms) in a program loop using imshow and saving each plot to .png. Even though I close() each plot after each savefig(...), the memory does not appear to be freed up, and the memory useage goes up and up as the program runs (and stalls the computer as it t

[Matplotlib-users] . Newbie. Interactive and saving plots to file

2007-04-10 Thread brett . mcsweeney
Just started using matplotlib (it's great!) interactively (using ipython, TkAgg backend) and am moving into saving plots to file. I edited the matplotlibrc to interactive: False and backend: Agg, and it works great. (produces .png) I would normally like to muck around interactively to get the p

Re: [Matplotlib-users] Getting data from a figure

2007-03-29 Thread brett . mcsweeney
Not sure what region[:] is supposed to achieve. You are creating a copy with the same name, so you are over-riding the original variable. Hi there I have a function where I want to display an image, get the user to zoom in on a region of interest, and then return the axes limits. But the p