Home »
Python »
Matplotlib MCQs
How to activate a style (for example, you want to activate 'fivethirtyeight' style) in Matplotlib?
32. How to activate a style (for example, you want to activate 'fivethirtyeight' style) in Matplotlib?
- plt.style.use('fivethirtyeight')
- plt.style.apply('fivethirtyeight')
- plt.style('fivethirtyeight')
- plt.style.activate('fivethirtyeight')
Answer: A) plt.style.use('fivethirtyeight')
Explanation:
To activate a style in Matplotlib, you can use plt.style.use() function. Consider the below code statement to apply a style named "fivethirtyeight" –
plt.style.use('fivethirtyeight')