Home »
Python »
Matplotlib MCQs
How to print a list of styles available in Matplotlib in order to let you tailor your visualization based on your needs?
31. How to print a list of styles available in Matplotlib in order to let you tailor your visualization based on your needs?
- print(plt.style)
- print(plt.style.available)
- print(plt.styles)
- print(plt.styles.available)
Answer: B) print(plt.style.available)
Explanation:
To print a list of styles available in Matplotlib in order to let you tailor your visualization based on your needs, you can use plt.style.available. Consider the below print statement –
print(plt.style.available)
The output would be –
['Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-v0_8', 'seaborn-v0_8-bright', 'seaborn-v0_8-colorblind', 'seaborn-v0_8-dark', 'seaborn-v0_8-dark-palette', 'seaborn-v0_8-darkgrid', 'seaborn-v0_8-deep', 'seaborn-v0_8-muted', 'seaborn-v0_8-notebook', 'seaborn-v0_8-paper', 'seaborn-v0_8-pastel', 'seaborn-v0_8-poster', 'seaborn-v0_8-talk', 'seaborn-v0_8-ticks', 'seaborn-v0_8-white', 'seaborn-v0_8-whitegrid', 'tableau-colorblind10']