First page Back Continue Last page Overview Graphics

Plotting the Data Histogram

import matplotlib.pyplot as plt

X, Y = zip(*in_time)

X2, Y2 = zip(*too_late)

bar_width = 0.9

plt.bar(X, Y, bar_width,

color="blue", alpha=0.75, label="in time")

bar_width = 0.8

plt.bar(X2, Y2, bar_width,

color="red", alpha=0.75, label="too late")

plt.legend(loc='upper right')

plt.show()