A demonstration of slice sampling in 1D. (See Radford Neal's 2003 paper "Slice Sampling"). Done in R with standard base graphics. Proposals are marked as red, and become black if accepted (i.e. if below the curve).
At 1:05, you can see a jump to the right mode, and it stays there until it jumps back at 11:30 very briefly. It is only at 12:45 that it really begins to explore the left mode again.
![](https://i.ytimg.com/vi/Dd8MdEsASRQ/mqdefault.jpg)