x=rnorm(100)
y=rnorm(100)
plot(x,y,xlab="this is the x-axis",ylab="this is the y-axis",main="Plot of X vs Y")
x=seq(-pi,pi,length=50)
y=x
f=outer(x,y,function(x,y)cos(y)/(1+x^2))#内积函数
contour(x,y,f,nlevels=45,add=T)#生成等高线图以表示三维数据
fa=(f-t(f))/2
contour(x,y,fa,nlevels=15)
image(x,y,fa)
persp(x,y,fa,theta=30,phi=40)#theta and phi控制绘图的角度