Cobweb diagram and map iterates

Manipulate[
Cob1=Show[Plot[{r x - r (x^2),x},{x,0,0.6},PlotStyle->{{Thickness[0.01],Red},Blue},Frame->True,PlotRange->{{0,0.6},{0,0.6}},AspectRatio->0.8,FrameLabel->{"x,  (Subscript[x, n])","f(x),  (Subscript[x, n+1])"},PlotLabel->Style["f(x) = r (x-(x^2))",Red,20],MeshFunctions->{((r #-r ((#)^2))-#)&},Mesh->{{0}},MeshStyle->Directive[Blue,PointSize[0.04]]],Graphics[Flatten[MapIndexed[{Opacity[0.79],Line[{{#,If[#==x0,0,#]},{#,r #-r ((#)^2)}}],Line[{{#,r #-r ((#)^2)},{r #-r ((#)^2),r #-r ((#)^2)}}]}& ,NestWhileList[r #-r ((#)^2)&,x0,#1≠r #2-r ((#2)^2)&,2,n]]]],ImageSize->{370,370},LabelStyle->18];
Iter1=ListLinePlot[NestList[r #-r ((#)^2)&,x0,n],DataRange->{0,n},FrameLabel->{"n","(Subscript[x, n])"},PlotRange->{0,0.6},Frame->True,Mesh->All,MeshStyle->{PointSize[Large],Red},PlotStyle->Gray,AspectRatio->0.8,ImageSize->{370,370},LabelStyle->18,PlotLabel->Style["(Subscript[x, n+1]) = r ((Subscript[x, n])-((Subscript[x, n])^2))",20]];
Cob2=Show[Plot[{r x ,x},{x,0,0.6},PlotStyle->{{Thickness[0.01],Red},Blue},Frame->True,PlotRange->{{0,0.6},{0,0.6}},AspectRatio->0.8,FrameLabel->{"x,  (Subscript[x, n])","f(x),  (Subscript[x, n+1])"},PlotLabel->Style["f(x) = r x",Red,20]],Graphics[Flatten[MapIndexed[{Opacity[0.79],Line[{{#,If[#==x0,0,#]},{#,r #}}],Line[{{#,r #},{r #,r #}}]}& ,NestWhileList[r #&,x0,#1≠r #2&,2,n]]]],ImageSize->{370,370},LabelStyle->18];
Iter2=ListLinePlot[NestList[r #&,x0,n],DataRange->{0,n},FrameLabel->{"n","(Subscript[x, n])"},PlotRange->{0,0.6},Frame->True,Mesh->All,MeshStyle->{PointSize[Large],Red},PlotStyle->Gray,AspectRatio->0.8,ImageSize->{370,370},LabelStyle->18,PlotLabel->Style["(Subscript[x, n+1]) = r (Subscript[x, n])",20]];(*this deleated last point, a fix for Mesh cosmetic error*)
Grid[{{Cob2,Iter2},{Show[Cob1],Iter1}},Spacings->{2.3,-2},Frame->All],
{{n,10,"Iterations, n"},1,40,1,ImageSize->Large,Appearance->"Labeled"}, 
{{r,1.95,"Parameter r"},0,2,ImageSize->Large,Appearance->"Labeled"},  
{{x0,0.05, "Initial condition (Subscript[x, 0])"},0,0.5,ImageSize->Large,Appearance->"Labeled"}]

Creation of this notebook was supported by IT Academy program of Information Technology Foundation for Education (HITSA).