Is it possible to fill between arbitrary regions of a chart not based upon the plotted data but the x-axis range?
In the time series plot below, I shade the region between 8pm and 8am using this fill_between call:
ax3.fill_between(d[0], 0, ax3.get_ylim()[1], where=fill, facecolor=face_color )
Where fill is determined based upon the data being recorded during those hours:
fill = [False if dt.time(8,0,0) < t.time() < dt.time(20,0,0) else True for t in d[0]]
This works fine for the first two shaded regions.
The issue is that sometimes, the recorded data will not be present for those hours and so the shaded region is too small and does not represent the appropriate hours (see the 3rd shaded region in the chart)
I realise I could do this by creating another data set with the appropriate x value range and then set it to invisible but I wanted to know if there is another way.

