The most straightforward way I can think of to recreate the walk part would be like this:
x = c(0)
for(i in 2:100){
x[i] = x[i-1] + floor(runif(1, -5, 5))
}
pdf(file = "My Plot.pdf", width = 4, height = 4)
plot(x, type="l")
dev.off()
Obs.: I made up a simple walk
The result was this one:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…