CobWeb[cc_,xx_,nn_,T_]:=Module[{},c=cc;
  L[x_]:=Line[{{x,x},{x,T[x]},{T[x],T[x]}}];
  s=NestList[T,xx,nn]; G=Plot[{T[x],x},{x,0,1},
  DisplayFunction->Identity,Axes->False,Frame->True];
  Show[{G,Graphics[{Thickness[0.0001],
    Append[Map[L,s],Line[{{xx,0.},{xx,xx}}]]}]},
  DisplayFunction->$DisplayFunction, AspectRatio->1,
  PlotRange->{{0,1},{0,1}},Frame->True]];

Logistic[x_]:=N[c*x(1-x)];
P=N[Pi]; SineFamily[x_]:=N[c Sin[P x]];

Example1:=CobWeb[2.9,0.2,30,Logistic];
Example2:=CobWeb[3.2,0.3,30,Logistic];
Example3:=CobWeb[3.9,0.3,60,Logistic];
Example4:=CobWeb[N[2/(3*Sin[Pi 2/3])],0.48,30,SineFamily];
Example5:=CobWeb[1.0,0.48,30,SineFamily];

