Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Close
From: Diwaker Gupta <diwaker.lists@gm...>  20060420 17:18:43

Hi, Does matplotlib provide functions to plot CDFs and PDFs (ala Matlab)? Thanks, Diwaker  Web/Blog/Gallery: http://floatingsun.net/blog 
From: David Huard <david.huard@gm...>  20060420 19:34:29
Attachments:
Message as HTML

Matplotlib provides hist, an histogram plotting function. For more involved computations, you would have to compute the pdf and cdf first using scipy.stats. For empirical distributions, I think the functions cumfreq and relfreq would do the job. For statistical distributions, use distribution.pdf and distribution.cdf, where distribution is norm, gamma, lognorm, ... David 2006/4/20, Diwaker Gupta <diwaker.lists@...>: > > Hi, > > Does matplotlib provide functions to plot CDFs and PDFs (ala Matlab)? > > Thanks, > Diwaker >  > Web/Blog/Gallery: http://floatingsun.net/blog > > >  > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with preintegrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.asus.falkag.net/sel?cmdlnk&kid=120709&bid&3057&dat=121642 > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > 
From: Diwaker Gupta <diwaker.lists@gm...>  20060422 17:54:56

On 4/20/06, David Huard <david.huard@...> wrote: > Matplotlib provides hist, an histogram plotting function. > For more involved computations, you would have to compute the pdf and cd= f > first using scipy.stats. For empirical distributions, I think the functio= ns > cumfreq and relfreq would do the job. For statistical distributions, use > distribution.pdf and distribution.cdf, where distribution is norm, gamma, > lognorm, ... Thanks for that tip David. Though it seems that even scipy doesn't do exactly what I want. I'm looking to plot the empirical CDF. scipy.stats.cumfreq divides the sample space into "bins" of fixed size, while I want a step function at the given points. I guess I'll just write my own.  Web/Blog/Gallery: http://floatingsun.net/blog 
From: David Huard <david.huard@gm...>  20060423 00:28:49
Attachments:
Message as HTML
histogramc.py

From: Diwaker Gupta <diwaker.lists@gm...>  20060423 01:29:51

On 4/22/06, David Huard <david.huard@...> wrote: > Not too fast !!! I'm currently writing a histogram class to take take of > that, among other things. If you want to take a look at it and give me so= me > feedback, it would be great. I haven't tested it extensively so there are > certainly some bugs. Basically, call > H =3D Histogram(data) > and then H.empirical_cdf(x) will return what you want, the interpolated > function. Thats amazing, thanks David! I'll test it and get back to you. Right now I just resorted to using Python RPY (interface to rlang) to get the ecdf. Diwaker  Web/Blog/Gallery: http://floatingsun.net/blog 
From: Alan G Isaac <aisaac@am...>  20060423 16:33:07

On Sat, 22 Apr 2006, David Huard apparently wrote: > I'm currently writing a histogram class to take take of > that, among other things. If you want to take a look at it > and give me some feedback, it would be great. Posting code with a license is helpful. Otherwise it is simply copyrighted these days. Useful licenses include public domain, or BSD, or MIT. Cheers, Alan Isaac 
From: David Huard <david.huard@gm...>  20060423 19:16:43
Attachments:
Message as HTML

Thanks for the tip, I intended to submit the class to scipy once sufficiently tested and robust= . I thought that putting no license meant : do what you want with it, and that's what I wanted. Guess I'll have to specify it. What a strange world w= e live in... David 2006/4/23, Alan G Isaac <aisaac@...>: > > On Sat, 22 Apr 2006, David Huard apparently wrote: > > I'm currently writing a histogram class to take take of > > that, among other things. If you want to take a look at it > > and give me some feedback, it would be great. > > Posting code with a license is helpful. > Otherwise it is simply copyrighted these days. > Useful licenses include public domain, or BSD, or MIT. > > Cheers, > Alan Isaac > > > > > >  > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with preintegrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.asus.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > 
From: Robert Kern <robert.kern@gm...>  20060423 20:01:37

David Huard wrote: > Thanks for the tip, > I intended to submit the class to scipy once sufficiently tested and > robust. Excellent! Thank you. > I thought that putting no license meant : do what you want with > it, and that's what I wanted. Guess I'll have to specify it. What a > strange world we live in... No, since sometime in the '70s, at least in the US, all original copyrightable works are automatically copyrighted at their creation. If you want people to be able to copy, modify, spindle, mutilate it, you have to give them permission. The easiest thing to do for code is usually to just say that it's license is the MIT or maybe BSD license (which we would prefer for scipy). And don't get me started on the public domain.  Robert Kern robert.kern@... "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth."  Umberto Eco 