R绘图

x <-0:20
y1 <- 6000*log(x)
y2 <- 11*x^3
y3 <-99*x^2+7 
plot(y1,type="l",ylim=c(0,20000),yaxs="i",xaxs="i",xlab="xlab",ylab="ylab",col="red",main="main",sub="sub")
lines(x,y2,col="yellow")
lines(x,y3,col="green")
legend("topleft",legend=c("y=6000*log(x)","y=11*x^3","y=99*x^2+7"),col=c("red","yellow","green"),lwd=2)
== ==
x <- y <- seq(-1.5,1.5,length=100)
z <- outer(x, y, function(x,y) x^2+y^2)
contour(x,y,z, levels=1)