Description Usage Arguments Examples
Plot/estimate surface
1 2 |
x |
formula or data |
data |
data.frame |
h |
bandwidth |
xlab |
X label |
ylab |
Y label |
zlab |
Z label |
gridsize |
grid size of kernel smoother |
... |
Additional arguments to graphics routine (persp3d or persp) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ksmooth2(rmvn(1e4,sigma=diag(2)*.5+.5),c(-3.5,3.5),h=1)
ksmooth2(rmvn(1e4,sigma=diag(2)*.5+.5),c(-3.5,3.5),h=1,
rgl=FALSE,theta=30)
ksmooth2(function(x,y) x^2+y^2, c(-20,20))
ksmooth2(function(x,y) x^2+y^2, xlim=c(-5,5), ylim=c(0,10))
f <- function(x,y) 1-sqrt(x^2+y^2)
surface(f,xlim=c(-1,1),alpha=0.9,aspect=c(1,1,0.75))
surface(f,xlim=c(-1,1),clut=heat.colors(128))
##play3d(spin3d(axis=c(0,0,1), rpm=8), duration=5)
ksmooth2(f,c(-1,1),rgl=FALSE,image=fields::image.plot)
surface(function(x) dmvn(x,sigma=diag(2)),c(-3,3),lit=FALSE,smooth=FALSE,box=FALSE,alpha=0.8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.