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.

## Re: [PyX-user] Curves of statistical distributions

 Re: [PyX-user] Curves of statistical distributions From: Paul Smith - 2006-05-01 21:12:24 ```On 5/1/06, Titus Winters wrote: > If you know the probability density function for the distribution you > are drawing, yes: > > import sys > from math import * > > from pyx import * > > sigma =3D float(sys.argv[1]) > mu =3D float(sys.argv[2]) > > g =3D graph.graphxy(width=3D8, > x=3Dgraph.axis.linear(min=3D-10,max=3D10)) > g.plot(graph.data.function("y(x)=3D1.0/(%f*((2*pi)**0.5))*exp(-1*((x-% > f)**2)/(2*(%f**2)))" % (sigma, mu, sigma)), > styles=3D[graph.style.line([color.rgb.red, > style.linestyle.solid, > style.linewidth.thick])]) > g.writePDFfile("norm.pdf") > > You can look up the appropriate function for your distribution on > wikipedia or mathworld, etc etc. > > -Titus > > On Mon, 2006-05-01 at 19:49 +0100, Paul Smith wrote: > > Dear All > > > > I am new to PyX and I am wondering whether PyX can easily draw the > > curve of the Gaussian distribution as well as the curve of other > > distributions. Thanks, Titus and Alan. I cannot see any example (at PyX's site) with tridimensional graphs. Can PyX plot z=3Dx^2+y^2, for instance? Paul ```

 [PyX-user] Curves of statistical distributions From: Paul Smith - 2006-05-01 18:49:46 ```Dear All I am new to PyX and I am wondering whether PyX can easily draw the curve of the Gaussian distribution as well as the curve of other distributions. Thanks in advance, Paul ```
 Re: [PyX-user] Curves of statistical distributions From: Alan G Isaac - 2006-05-01 19:08:28 ```On Mon, 1 May 2006, Paul Smith apparently wrote: > I am new to PyX and I am wondering whether PyX can easily draw the > curve of the Gaussian distribution as well as the curve of other > distributions. You mean *analytical* distributions? See the function class: http://pyx.sourceforge.net/manual/module-graph.data.html#graph:data For empirical distributions, see the histogram example: http://pyx.sourceforge.net/examples/graphs/index.html hth, Alan Isaac ```
 Re: [PyX-user] Curves of statistical distributions From: Paul Smith - 2006-05-01 21:12:24 ```On 5/1/06, Titus Winters wrote: > If you know the probability density function for the distribution you > are drawing, yes: > > import sys > from math import * > > from pyx import * > > sigma =3D float(sys.argv[1]) > mu =3D float(sys.argv[2]) > > g =3D graph.graphxy(width=3D8, > x=3Dgraph.axis.linear(min=3D-10,max=3D10)) > g.plot(graph.data.function("y(x)=3D1.0/(%f*((2*pi)**0.5))*exp(-1*((x-% > f)**2)/(2*(%f**2)))" % (sigma, mu, sigma)), > styles=3D[graph.style.line([color.rgb.red, > style.linestyle.solid, > style.linewidth.thick])]) > g.writePDFfile("norm.pdf") > > You can look up the appropriate function for your distribution on > wikipedia or mathworld, etc etc. > > -Titus > > On Mon, 2006-05-01 at 19:49 +0100, Paul Smith wrote: > > Dear All > > > > I am new to PyX and I am wondering whether PyX can easily draw the > > curve of the Gaussian distribution as well as the curve of other > > distributions. Thanks, Titus and Alan. I cannot see any example (at PyX's site) with tridimensional graphs. Can PyX plot z=3Dx^2+y^2, for instance? Paul ```
 Re[2]: [PyX-user] Curves of statistical distributions From: Alan G Isaac - 2006-05-02 00:01:23 ```On Mon, 1 May 2006, Paul Smith apparently wrote: > Thanks, Titus and Alan. I cannot see any example (at PyX's > site) with tridimensional graphs. Can PyX plot z=x^2+y^2, > for instance? I think there is some experimental code around. Matplotlib also has some "young" code for 3D plots. But right now the easiest way to get extensively tested 3D plots, AFAIK, is with Gnuplot.py. hth, Alan Isaac ```
 Re: Re[2]: [PyX-user] Curves of statistical distributions From: Paul Smith - 2006-05-02 08:31:05 ```On 5/2/06, Alan G Isaac wrote: > > Thanks, Titus and Alan. I cannot see any example (at PyX's > > site) with tridimensional graphs. Can PyX plot z=3Dx^2+y^2, > > for instance? > > I think there is some experimental code around. > Matplotlib also has some "young" code for 3D plots. > But right now the easiest way to get extensively > tested 3D plots, AFAIK, is with Gnuplot.py. Thanks, Alan. Is there some reason why using Gnuplot.py instead of Gnuplot directly? Paul ```
 Re[4]: [PyX-user] Curves of statistical distributions From: Alan G Isaac - 2006-05-02 11:44:57 ```On Tue, 2 May 2006, Paul Smith apparently wrote: > Thanks, Alan. Is there some reason why using Gnuplot.py > instead of Gnuplot directly? You might be doing your data manipulation in Python. If so, why leave a friendly environment. ;-) Cheers, Alan ```
 Re: Re[4]: [PyX-user] Curves of statistical distributions From: Paul Smith - 2006-05-02 12:08:37 ```On 5/2/06, Alan G Isaac wrote: > > Thanks, Alan. Is there some reason why using Gnuplot.py > > instead of Gnuplot directly? > > You might be doing your data manipulation in Python. > If so, why leave a friendly environment. ;-) Quite reasonable, Alan. Thanks. Paul ```