I have a horizontal bar chart where I'm supposed to turn the bars slowly from yellow to red based on the horizontal value. So the greater the X value the more the bars chart get red
(I wanted to show the plot but I couldn't upload the image of it due to my low reputation)
import matplotlib.pyplot as plt
x = [3,3,4]
y = [1,2,5]
plt.barh(x,y)
plt.show()