142007
 

代码如下:

plot(1,xlim=c(0,2*pi),ylim=c(-2,2),type='n',axes = F,ann=F)
x=seq(0,2*pi,.01)
lines(x,0.6*sin(x),lwd=2)
lines(x,0.6*sin(x-pi),lty=2,col='red')
segments(0,0,.5,1.5,lwd=2)
segments(2*pi,0,2*pi-.5,1.5,lwd=2)
points(pi/2,0,pch = 21, cex = 12)
points(3*pi/2,0,pch = 21, cex = 12 ,bg = "black")
segments(pi,0,pi,-1, lwd = 2)
points(pi-0.2,-1,pch = 21, cex = 4)
points(pi+0.2,-1,pch = 21, cex = 4)

m <- seq(pi-1,pi+1,length = 100)
f1 <- function(x) -1-dnorm(x,mean = pi)
y1 <- f1(m)
f2 <- function(x)0.5*(x-pi)^2
tmp <- f2(m)
y2 <- f2(m) - (tmp[1]-y1[1])

polygon(c(m,m),c(y1,y2),col = "maroon1" ,border = NA)

纯属娱乐,看到绘图以后不要胡思乱想 ……

相关文章:

  • Joyce
    haha  cool~