When do we use fill-between for line graphs in Matplotlib?


#1

Question

When do we use fill-between for line graphs in Matplotlib?

Answer

Fill-between is used to let us see a possible range of upper and lower bounds that values might fall between, due to possible error or uncertainty. For example, showing historical data of temperature over several years, which can help us see what range of temperatures a location might fall in the future.

Another application of fill-between is when we want to create area plots, which show quantitative data over time. Additional applications are in stock price data, and in machine learning, such as for test data.