The seaborn styles shipped by Matplotlib are deprecated since 3.6, as they no longer correspond to the styles shipped by seaborn. However, they will remain available as 'seaborn-v0_8-'. Alternatively, directly use the seaborn API instead.
I have tried this:
# use seaborn style
plt.style.use("seaborn")
but it is deprecated, and I want to remove this warning when I use the cmd in windows
CodePudding user response:
The error message is telling you that seaborn styles in matplotlib do not match current seaborn styles, since the latest have been updated.
This is why you should set the style as follow:
plt.style.use("seaborn-v0_8")
You can specify a theme by replacing <style>
with one the following:
- white
- dark
- whitegrid
- darkgrid
- ticks
Just like this:
plt.style.use("seaborn-v0_8-whitegrid")
Alternatively, if you want to use the latest seaborn styles, use their library directly