Seaborn 数据可视化入门
Content Team
DataCamp

折线图:二氧化氮随时间的平均水平

点图:吸烟者与非吸烟者的平均餐厅账单

两者都显示:
差异:
两者都显示:


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", linestyle="none")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", errorbar=None)plt.show()

Seaborn 数据可视化入门