I have the code for following graph. I need to add a threshold value for each of the graph. This value does change from one group to another.
import numpy as np
import matplotlib.pyplot as plt
n_groups = 4
heuristic = (230.193, 33.96, 46, 8)
safe = (195.8, 24.83, 36, 7)
# create plot
fig, ax = plt.subplots()
index = np.arange(n_groups)
bar_width = 0.1
opacity = 0.8
rects1 = plt.bar(index, heuristic, bar_width,
marker="D",
alpha=opacity,
color='b',
label='Heuristic')
rects2 = plt.bar(index + bar_width, safe, bar_width,
alpha=opacity,
color='g',
label='SAFE')
plt.xlabel('Firmware')
plt.ylabel('nDCG')
plt.title('Matching results by firmware')
plt.xticks(index + bar_width, ('Mqtt', 'Solder', 'Iron', 'Sympetrum'))
plt.legend()
plt.tight_layout()
plt.show()
The following is the graph it produces and I have used pink marker to show you what I want the code to produce. Sorry the lines are not straight. Any help is really appreciated. Thanks

