matplotlib styles attr
style.use('Solarize_Light2') plt.plot([1, 2, 3], [5, 2, 7]) plt.show() style.use('default') plt.plot([1, 2, 3], [5, 2, 7]) plt.show() #We can see all the available styles by accessing the style.available attribute. style.available
Here is what the above code is Doing:
1. We import the style module from the matplotlib library.
2. We use the style.use() function to select a style.
3. We plot a graph.
4. We use the style.use() function to select the default style.
5. We plot a graph.
6. We print the available styles.