def calc_time_axis(df):
    """Returns the number of minutes between midnight of the earliest date
    and midnight of the day after the latest date in the dataset"""
    time_min = df.Timestamp.min()
    time_max = df.Timestamp.max()
    
    diff_in_days =(time_max.date() - time_min.date())
    diff_in_minutes = (diff_in_days.days + 1)*24*60
    return diff_in_minutes