Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seaborn style not being applied

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'])

Seaborn plot with matplotlib style

like image 953
user2696565 Avatar asked Jan 26 '19 21:01

user2696565


People also ask

How do I change my style in seaborn?

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 seaborn is not working in Jupyter?

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 is %Matplotlib inline?

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.


1 Answers

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'])
like image 157
Sheldore Avatar answered Nov 15 '22 07:11

Sheldore