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?

  1. plt.style.use('fivethirtyeight')
  2. plt.style.apply('fivethirtyeight')
  3. plt.style('fivethirtyeight')
  4. 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')

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.