I have a dataset and I want to do the bar plot horizontally in python. Here is the code which I use:
rating = [8, 4, 5, 6,7, 8, 9, 5]
objects = ('h', 'b', 'c', 'd', 'e', 'f', 'g', 'a')
y_pos = np.arange(len(objects))
plt.barh(y_pos, rating, align='center', alpha=0.5)
plt.yticks(y_pos, objects)
#plt.xlabel('Usage')
#plt.title('Programming language usage')
plt.show()
It works, however the thing that I want, I want to change the plot like this image:
I want to change the topest column to red. And put the yticks to a clumn like the image. Could you please help me with that? Thank you.