Back to Seaborn

Countplot

doc/_docstrings/countplot.ipynb

0.13.2301 B
Original Source
python
import seaborn as sns
sns.set_theme(style="whitegrid")
titanic = sns.load_dataset("titanic")
python
sns.countplot(titanic, x="class")
python
sns.countplot(titanic, x="class", hue="survived")
python
sns.countplot(titanic, x="class", hue="survived", stat="percent")