What function is used to set the transparency of elements in a plot in Matplotlib?
Correct answer
A. plt.set_alpha()
17 views
A. plt.set_alpha()
17 views
Transparency is controlled by the alpha value, set with set_alpha() on a plot element or, more commonly, with the alpha argument: plt.plot(x, y, alpha=0.5).
Alpha runs from 0 (fully transparent) to 1 (fully opaque).
Practise more Data Science MCQs with answers and explanations on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.