So I want to almost create something similar to a trigger as if it was sql where in the graph, the shading starts when y=1 and then stops shading where y=0. Then repeat that sequence for the remainder of the graph. For the current code, it looks like it just shades when there are multiple instances of y equaling 1, which would make sense with the output I have right now. Photo of output is shown as well.current output
ax = df_merge.plot(kind='scatter', x='OPTY_CLOSE_DATE', y='REVENUE_STATUS_FLAG')
ax.fill_between(df_merge['OPTY_CLOSE_DATE'], 0, df_merge['REVENUE_STATUS_FLAG'], where=df_merge['REVENUE_STATUS_FLAG']==1, alpha=0.4,)
