Introduction to Data Visualization with Seaborn
Erin Case
Data Scientist
Line plot: average level of nitrogen dioxide over time
Point plot: average restaurant bill, smokers vs. non-smokers
Both show:
Differences:
Both show:
import matplotlib.pyplot as plt
import seaborn as sns
sns.catplot(x="age",
y="masculinity_important",
data=masculinity_data,
hue="feel_masculine",
kind="point")
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.catplot(x="age", y="masculinity_important", data=masculinity_data, hue="feel_masculine", kind="point", join=False)
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
sns.catplot(x="smoker",
y="total_bill",
data=tips,
kind="point")
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
from numpy import median
sns.catplot(x="smoker",
y="total_bill",
data=tips,
kind="point",
estimator=median)
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.catplot(x="smoker", y="total_bill", data=tips, kind="point", capsize=0.2)
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.catplot(x="smoker", y="total_bill", data=tips, kind="point", ci=None)
plt.show()
Introduction to Data Visualization with Seaborn