The distance, d, of weight attached to the spring from its equilibrium is shown against θ is given in the attachment. You can converit into time, by using θ = ωT. And I have plotted the graph of d against θ or ωT as ω is constant. As a result we have the desired graph.