What is the purpose of the plt.fill_between() function in Matplotlib?
Correct answer
A. To fill the area between two horizontal curves
16 views
A. To fill the area between two horizontal curves
16 views
plt.fill_between() fills the area between two curves defined over the same x-values (or between one curve and a baseline).
It is commonly used for confidence bands and for shading the area under a line. fill_betweenx() is the version for curves defined over y-values.
For more solved questions like this one, see Data Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.