|
1.matlab:
2.R:
https://www.stat.auckland.ac.nz/~paul/RGraphics/examples-simonmatt.R
> # Distance Between Brownian Motions 布朗运动之间的距离
> n <- 100
> xx <- c(0:n, n:0) #生成202个元素的向量,其中前面101与后面101数字对称
> yy <- c(c(0, cumsum(stats::rnorm(n))), rev(c(0, cumsum(stats::rnorm(n)))))
> plot (xx, yy, type = "n", xlab = "Time", ylab = "Distance")
> polygon(xx, yy, col = "gray", border = "red")
http://wap.sciencenet.cn/blog-651374-1126673.html
参考教程:ggplot2 Guide to Create Beautiful Graphics in R
3.PS
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-21 09:48
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社