I have the following code:
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
hour_of_day = [17, 13, 21, 21, 16, 15, 9, 10, 12, 11, 10, 1, 5, 13, 13, 18, 21, 23, 23, 14, 11, 12, 15, 17, 9, 19, 7, 20, 20, 21, 21, 19, 2, 8, 23, 8, 8, 10, 15, 11, 19, 18, 20, 22, 22, 0, 0, 10, 13, 11, 16, 18, 18, 19, 19, 19, 23, 4, 6, 11, 15, 14, 16, 21, 20, 20, 21, 21, 14, 15, 19, 20, 23, 6, 6, 14, 15, 0, 1, 1, 12, 20, 21, 21, 3, 2, 5, 6, 6, 7, 10, 10, 11, 12, 12, 9, 14, 14, 19, 15, 16, 21, 21, 22, 22, 20, 4, 6, 7, 17, 17, 18, 18, 19, 8, 14, 13, 20, 14, 0, 6, 4, 7, 13, 12, 12, 17, 19, 21, 22, 0, 0]
fig, ax = plt.subplots()
counts, bins, patches = ax.hist(
hour_of_day,bins=range(25), normed = False, color = 'g')
plt.plot(bins)
plt.show()
It generates the (almost) expected figure. In particular, it renders an unexplained blue(!) diagonal. What is this line? Where is it coming from? How can I disable it?
For reference, here is the result I get:
plt.plot(bins)