Cobweb plot (source code)

= Cobweb plot
{wiki}

A cobweb plot alternates vertical moves to the graph $y=g(x)$ and horizontal moves to the diagonal $y=x$, displaying the iterates of $x_{n+1}=g(x_n)$ geometrically.