I have custom data on X and Y. Actually i'm using plt.fill_between to have an area chart with fixed color. I would like to have gradient color instead of fixed color.
import matplotlib.pyplot as plt
import pylab
import numpy as np
import matplotlib
x1 = ['LUG','17','18','19','22','23','24','25','26','29','30','31','AGO','2']
z = [0,0.27,0.6,0.42,-0.48,-0.53,0.41,-0.61,0.48,-0.25,1.04,1.57,1.07,1.69]
plt.subplot(4, 1, 4)
plt.fill_between(x1, z, color='yellow', alpha=0.1)
plt.fill_between( x1, z, color="yellow", alpha=0.1)
plt.plot(x1, z, color="red", alpha=0.6)
plt.axhline(y=0, linewidth=1, color='pink')
plt.xlabel('time (day)')
#legend
plt.legend(['Equity'], loc='lower left')
plt.tight_layout()
plt.show()