On 5/1/06, Titus Winters <[EMAIL PROTECTED]> wrote:
If you know the probability density function for the distribution you are drawing, yes:import sys from math import * from pyx import * sigma = float(sys.argv[1]) mu = float(sys.argv[2]) g = graph.graphxy(width=8, x=graph.axis.linear(min=-10,max=10)) g.plot(graph.data.function("y(x)=1.0/(%f*((2*pi)**0.5))*exp(-1*((x-% f)**2)/(2*(%f**2)))" % (sigma, mu, sigma)), styles=[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=x^2+y^2, for instance? Paul ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
