I just updated conda and installed seaborn (v0.9.0). Then started jupyter notebook and tried to plot a seaborn distplot, but strangely it has matplotlib style! Could someone please help me apply seaborn style with seaborn plots.
import seaborn as sns
%matplotlib inline
sns.distplot(tips['total_bill'])
If you want to customize the seaborn styles, you can pass a dictionary of parameters to the rc argument of axes_style() and set_style() . Note that you can only override the parameters that are part of the style definition through this method.
Why is Seaborn not working in Jupyter or other data Visualization environments? The typical reason for this error is that the Seaborn package is simply not installed in your environment. Before starting your troubleshooting, you might want to use the command pip list to find out the packages that are installed.
Why matplotlib inline is used. You can use the magic function %matplotlib inline to enable the inline plotting, where the plots/graphs will be displayed just below the cell where your plotting commands are written. It provides interactivity with the backend in the frontends like the jupyter notebook.
Try using
sns.set()
after %matplotlib inline
as following and see if it works then.
import seaborn as sns
%matplotlib inline
sns.set()
sns.distplot(tips['total_bill'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With