Introduction to Data Visualization with Seaborn
Erin Case
Data Scientist
relplot()
col=
and row=
import matplotlib.pyplot as plt
import seaborn as sns
sns.countplot(x="how_masculine",
data=masculinity_data)
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
sns.catplot(x="how_masculine",
data=masculinity_data,
kind="count")
plt.show()
import matplotlib.pyplot as plt import seaborn as sns
category_order = ["No answer", "Not at all", "Not very", "Somewhat", "Very"]
sns.catplot(x="how_masculine", data=masculinity_data, kind="count", order=category_order)
plt.show()
Displays mean of quantitative variable per category
import matplotlib.pyplot as plt
import seaborn as sns
sns.catplot(x="day",
y="total_bill",
data=tips,
kind="bar")
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.catplot(x="day", y="total_bill", data=tips, kind="bar", ci=None)
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.catplot(x="total_bill", y="day", data=tips, kind="bar")
plt.show()
Introduction to Data Visualization with Seaborn