This is a simple code in Python 3 using the matplotlib libary to plot a cobweb graph. More information about cobweb plot can be found here. Also, a online cobweb plotter can be found here, where it was used as a inspiration to do this code.
This code plots the functions y = x in red, in the interval [0, 1.2] x [0, 1.2] and the graph of
f(x) = a * x * (1 - x)
Then, applys the map to the initial point given.
Plot using a = 2, and x_0 as 0.1
Plot using a = 4, and x_0 as 0.2