Folks, I have vector [2,3,5,8,4,3,2,1] that I am plotting on y axis against range(10) as x axis. I am doing this using matplotlib's stackplot.
import matplotlib.pyplot as plt
y = [1, 3, 4, 5, 6, 7, 8, 6]
x = range(8)
fig, ax = plt.subplots()
ax.stackplot(x, y)
plt.show()
Now I have another vector [8, 9, 0, 0, 0, 0, 1, 4], which is intensity for vector y. I need to use this intensity vector to color code my stackplot so that I can visualize the color spectrum. Intensity is out of 10. How do I do that?
