grouped_dates = [[d, len(list(g))] for d, g in itertools.groupby(
    list_of_dates, lambda k: k.date())]
dates, counts = grouped_dates.transpose()
counts = counts.cumsum()
step(dates, counts)
Построение кумулятивного графика даты и времени Python