Maybe create two functions plot_cdf and plot_timeseries and call them from here