I want to run this exact code:
import numpy as np
import matplotlib.pyplot as plt
#xs = np.linspace(1, 21, 200)
plt.figure(figsize=(6, 3))
plt.hlines(y='Test1', xmin=1929, xmax=1978, colors='red', linestyles='-', lw=2, label='Test1')
plt.hlines(y='Test2', xmin=1800, xmax=1991, colors='blue', linestyles='-', lw=2, label='Test2')
plt.hlines(y='Test3', xmin=1930, xmax=2007, colors='green', linestyles='-', lw=2, label='Test3')
plt.show()
And get this exact output:
However, I want markers (circles) at either end of each line.
Markers don't seem to be an option in hlines, from the documentation here.
Can someone suggest an alternative to reproducing the same graph, but with markers like these?