Re: [Matplotlib-users] power law fitting of data

2007-12-06 Thread Ping Yeh
Ahhh... Yes, I should turn to scipy for this. Great suggestion! I'll look for least square fit and maximum likelihood fit. My next question is about plotting any function f(x) on top of data. I know I could just produce enough (x,y) points and plot(x,y). But a convenience function like plot(f,

[Matplotlib-users] Problems building matplotlib on OSX Leopard

2007-12-06 Thread Andrew Jaffe
Hi All, I've been compiling svn versions of matplotlib on OSX for quite a while with no (or few...) problems. On upgrading to leopard on my mac pro, I've run into the error messages below. External libs are from fink. There seems to be some problem with attempts to build a universal binary.

Re: [Matplotlib-users] number rendering in GTKCairo

2007-12-06 Thread Michael Droettboom
Great! Glad to hear that's resolved. Yes -- saving PDF's from the GtkAgg window is a recent(ish) change. Cheers, Mike - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop

[Matplotlib-users] bug in cm.py

2007-12-06 Thread Vincent Schut
Hi, there is a bug in cm.py (svn): it references npy (first time: line 58), but npy is never imported. Cheers, VS. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to

Re: [Matplotlib-users] bug in cm.py

2007-12-06 Thread Michael Droettboom
Thanks. I have corrected this in SVN. Cheers, Mike Vincent Schut wrote: Hi, there is a bug in cm.py (svn): it references npy (first time: line 58), but npy is never imported. Cheers, VS. - SF.Net email is

Re: [Matplotlib-users] bug in cm.py

2007-12-06 Thread Vincent Schut
Thanks. However, now I get a different error: Traceback (most recent call last): File /usr/lib64/python2.5/site-packages/matplotlib/backends/backend_gtk.py, line 331, in expose_event self._render_figure(self._pixmap, w, h) File

Re: [Matplotlib-users] bug in cm.py

2007-12-06 Thread Michael Droettboom
Can you send your script that triggers this bug? I wasn't the author of this code, so I don't know how to get that path to execute -- but I'm happy to work through your example until it's working. (I suspect the intention here was m, n = x.shape[:2], but I can't test it.) Cheers, Mike

Re: [Matplotlib-users] bug in cm.py

2007-12-06 Thread Vincent Schut
Hmm, that's a bit hard, it's not really what one would call a self-contained example... the bug triggers when I load a rgb numpy float array with imshow (only with floats, not with ints). After some thought and trial, it's simple: these lines already trigger the error: #==

Re: [Matplotlib-users] bug in cm.py

2007-12-06 Thread Michael Droettboom
Thanks, that helps a lot. It seems to be working now -- I've committed this in r4643. Cheers, Mike Vincent Schut wrote: Hmm, that's a bit hard, it's not really what one would call a self-contained example... the bug triggers when I load a rgb numpy float array with imshow (only with

[Matplotlib-users] scipy.stats.percentileofscore : something strange

2007-12-06 Thread Samuel GARCIA
Hi all, I found something strange in scipy.stats.percentileofscore In [1]: from scipy import * In [2]: a = rand(1) In [3]: stats.percentileofscore(a,.2) Out[3]: 20.0157565073 This OK. In [4]: stats.percentileofscore(a,.0002) Out[4]: 102.898311442 This

Re: [Matplotlib-users] Problems building matplotlib on OSX Leopard

2007-12-06 Thread John Hunter
On Dec 6, 2007 5:40 AM, Andrew Jaffe [EMAIL PROTECTED] wrote: Hi All, I've been compiling svn versions of matplotlib on OSX for quite a while with no (or few...) problems. On upgrading to leopard on my mac pro, I've run into the error messages below. External libs are from fink. There

Re: [Matplotlib-users] power law fitting of data

2007-12-06 Thread Ryan May
Ping Yeh wrote: Hi, I have (x,y) data that I want to fit to the formula y = a * x^b to determine a and b. How can I do it? The current manual only lists linear fit and polynomial fit. If you just want quick power law fit without turning to the other solutions, you can just transform your

Re: [Matplotlib-users] wxmpl: Can't create printer PDF because the id PDF is already used

2007-12-06 Thread Giorgio F. Gilestro
I have the same problem with ubuntu gutsy. I believe it is a bug in libgnomeprint, not in wx. Ryan Krauss wrote: FYI, I see this same warning in another wxPython program of mine that doesn't use mpl or wxmpl, so it seems like it is a wxPython issue. Solutions are still welcome. Ryan On

Re: [Matplotlib-users] How to show matplotlib.image ?

2007-12-06 Thread Giorgio F. Gilestro
As as wxmpl user I say that is a great great idea! Christopher Barker wrote: John Hunter wrote: You cannot import pylab and use the FigureCanvasWx at the same time. Please follow the lead of examples/embedding_in_wx*.py if you want to use matplotlib in a wxpython GUI. or use

Re: [Matplotlib-users] bug in cm.py

2007-12-06 Thread Eric Firing
Mike, Thanks for fixing those two errors that I introduced in 4374. I'm sorry that I evidently did not test that code path, or even inspect it carefully. Eric Michael Droettboom wrote: Thanks, that helps a lot. It seems to be working now -- I've committed this in r4643. Cheers, Mike

Re: [Matplotlib-users] power law fitting of data

2007-12-06 Thread Jessica Lu
Hi, I just happened to do the same thing two days ago. If you want uncertainties as well, here is some code that uses scipy.optimize. I just put up a preliminary example on the scipy wiki: http://www.scipy.org/Cookbook/FittingData?action=show Not the cleanest or most sophisticated code in

[Matplotlib-users] Cross hair and polygon drawing tools.

2007-12-06 Thread Venkat Ramanan
Hi, I'm looking for something analogous to Matlab's ginput() and roipoly(). ginput() basically displays a crosshair on the current figure and allows us to select points by clicking on it. It returns the x,y coordinates of the points. roipoly() allows us to define a polygon by clicking on the

[Matplotlib-users] Error producing a plot after updating to 0.91.1

2007-12-06 Thread Adam Mercer
Hi Since updating to 0.91.1 one of my scripts, attached, has stopped working. I get the following error when trying to run it $ ./plot.py data.dat plot.png alloc: invalid block: 0x1c15fa4: 40 1 0 Abort trap $ Any ideas what could be causing this? Cheers Adam plot.py Description: Binary

[Matplotlib-users] Pan/zoom interferes with user-specified right button callback.

2007-12-06 Thread Venkat Ramanan
Hi, I have written a simple image viewing tool with window/level controls linked to the right mouse, which generally works okay. But when I use the pan/zoom button, clicking and dragging the right mouse button changes the zoom as intended, but also affects the window/level too which is

[Matplotlib-users] Missing labels/text(s) in plots generated via cgi script.

2007-12-06 Thread Tim Lewis
I'm using the code from http://www.scipy.org/Cookbook/Matplotlib/Using_MatPlotLib_in_a_CGI_script to generate plots from my web server. The plot shows up fine (w/o text) but when I use xlabel(x-axis), ylabel(y-axis), or title(A Chart); no text shows up on the plot. Everything seems fine with the