Accepted answer

Unless you really need the legend entry, I would recommend using plotBands instead

You can also do it like this, if you do really need the legend:


It relies in part on setting a min and max, and using those min and max values as your y data points.

Related Query

More Query from same tag