if (FALSE) {
x <- 1:10
y <- 3-2*x+x*x+rnorm(10)
gp.open()
gp.plot(x,y)
gp.send('replot 3-2*x+x**2')
tmp <- expand.grid(x=1:10, y=1:10)
tmp <- transform(tmp, z=(x-5)*(y-3))
gp.splot(tmp$x, tmp$y, tmp$z)
gp.close()
}
Run the code above in your browser using DataLab