How to create a historical timeline using Pandas Dataframe and matplotlib
Sorry for the late reply. I don't know whether the below kind of plot suffices for what you are looking. 

If yes is the case, you might like matplotlib.hlines. I am providing a sample code for generating a picture like the above.

import matplotlib.pyplot as plt
import random

for x in range(0, 10, 2):
    color = random.choice(['red', 'green', 'blue', 'yellow'])
    plt.hlines(1, x, x + 2, colors=color, lw=5)
    plt.text(x + 1, 1.01, color, ha='center')
plt.show()


Let me know if this was helpful!