On 5/1/06, Titus Winters <titus@...> 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=3D10,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, 20060501 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
