First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 11 years ago

calc314 gravatar image

You need to define the function in the plot using a python lambda function. This has to do with how the distribution function is being evaluated. It is not a symbolic function in this case but is a numeric function from python. The following produces a plot for me.

var('y')
T = RealDistribution('gaussian',1)
plot3d(lambda x,y: T.cum_distribution_function((1-y)/x), (x,-2,2), (y,-2,2))

See the link here to execute the code in the single cell server.

click to hide/show revision 2
No.2 Revision

updated 11 years ago

kcrisman gravatar image

You need to define the function in the plot using a python lambda function. This has to do with how the distribution function is being evaluated. It is not a symbolic function in this case but is a numeric function from python. The following produces a plot for me.

var('y')
T = RealDistribution('gaussian',1)
plot3d(lambda x,y: T.cum_distribution_function((1-y)/x), (x,-2,2), (y,-2,2))

See the link here to execute the code in the single cell server.