Matplotlib & Datetimes – Tutorial 04: Grouping & Analysing Sparse Data
To extend the previous tutorial (see here), we define a data array that has some information about the event that occurred for each datetime. The plot of data vs time now looks like: The data array is constructed with numpy.random: data = np.random.randint(10000,size=len(times)) Now, we will modify the example from tutorial 03: def group(di): return…