Plotting the bifurcation diagram of a chaotic dynamical system