| 1 | initial version |
WorksForMe(TM) in Sagecell and in Sage 9.6.rc3. Let's assess the density of a bivariate standard normal by plotting 1000 random points :
set_random_seed(0)
X=r.rnorm(1000,0,1)._sage_()
Y=r.rnorm(1000,0,1)._sage_()
Z=r.dnorm(list(map(lambda u,v:sqrt(u^2+v^2), X, Y)),0,1)._sage_()
P=list_plot3d(list(zip(X,Y,Z)))
show(P, aspect_ratio=[1,1,5])
HTH,
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.