I would like to plot a horizontal line above each bar in this chart. The y-axis location of each bar depends on the variable 'target.' I want to use axhline, if possible, or Line2D because I need to be able to modify the line style, color, length, and width.
import matplotlib.pyplot as plt
plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# Example data
people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')
#Here are the targets that I want to use
#to plot horizontal lines above each bar...
targets = (6,6,8,6,9)
ind = np.arange(len(people))
performance = 3 + 10 * np.random.rand(len(people))
error = np.random.rand(len(people))
plt.bar(ind, performance, align='center')
plt.xticks(ind, people)
plt.show()
Thanks in advance!