Giới thiệu trực quan dữ liệu với Seaborn
Content Team
DataCamp

Biểu đồ đường: mức NO2 trung bình theo thời gian

Biểu đồ điểm: hóa đơn nhà hàng trung bình, người hút vs. không hút thuốc

Cả hai hiển thị:
Khác nhau:
Cả hai hiển thị:


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()

Giới thiệu trực quan dữ liệu với Seaborn