CobWeb[c_,x0_,n_]:=Module[{}, T[x_]:=N[c*x(1-x)];
  L[x_]:=Line[{{x,x},{x,T[x]},{T[x],T[x]}}]; s=NestList[T,x0,n]; 
  G=Plot[{x,T[x]},{x,0,1}]; 
  H=Graphics[Append[Map[L,s],Line[{{x0,0},{x0,x0}}]]];
  Show[{G,H},PlotRange->{{0,1},{0,1}},AspectRatio->1]];

CobWeb[3.9,0.1,300];


