horizontal line with matplotlib code example
Example 1: vertical line in matplotlib
xposition = [0.3, 0.4, 0.45]
for xc in xposition:
plt.axvline(x=xc, color='k', linestyle='--')
Example 2: how to plotting horizontal bar on matplotlib
import matplotlib.pyplot as plt
data = [5., 25., 50., 20.]
plt.barh(range(len(data)), data)
plt.show()