| Library: | plot |
| See also: | graxes plot setmask setmaskp setmaskl setmaskt |
| Quantlet: | plot3d | |
| Description: | easy way to create nice plots of 3D data |
| Usage: | plot3d(type,x1{,x2{,x3{,x4{,x5{,x6{,x7{,x8}}}}}}}) | |
| Input: | ||
| type | integer, type = 1, 2,...,8; type of plot | |
| x1 | first graphical object to plot | |
| x2 | second graphical object to plot | |
| x3 | third graphical object to plot | |
| x4 | fourth graphical object to plot | |
| x5 | fifth graphical object to plot | |
| x6 | sixth graphical object to plot | |
| x7 | seventh graphical object to plot | |
| x8 | eighth graphical object to plot | |
library("smoother")
library("plot")
randomize(0)
x = 2.*pi.*(uniform(400,2)-2)
m = sum(cos(x),2)
e = uniform(400)-0.5
x = x~(m+e)
mh = regestp(x,2)
mh = setmask(mh, "surface","blue")
m = setmask(x[,1:2]~m,"black","cross","small")
plot3d(1,mh,m)
setgopt(plot3disp,1,1,"title","plot3d")
Nice 3D-plot of the data and the kernel regression estimate.
library("smoother")
library("plot")
randomize(0)
x = 2.*pi.*(uniform(400,2)-2)
m = sum(cos(x),2)
e = uniform(400)-0.5
x = x~(m+e)
mh = regestp(x,2)
mh = setmask(mh, "surface","blue")
m = setmask(x[,1:2]~m,"black","cross","small")
plot3d(3,mh,m)
setgopt(plot3disp,1,1,"title","plot3d")
Nice 3D-plot of the data and the kernel regression estimate.