Это то, что вы хотите
price_high_y = np.array([0.0018, 0.0018, 0.0018, 0.0018001, 0.0018001, 0.0018, 0.0018, 0.0018])
yvals = sorted(np.unique(price_high_y))
colors = {0.0018: 'k', 0.0018001: 'y'}
for i, y in enumerate(yvals):
plt.axhline(i+0.5, color=colors[y])
plt.yticks(np.arange(len(yvals))+0.5, yvals)
plt.xticks([0, 1])
plt.show()
