การสร้างภาพข้อมูลด้วย Seaborn เบื้องต้น
Content Team
DataCamp

Line plot: ระดับเฉลี่ยของไนโตรเจนไดออกไซด์ตามช่วงเวลา

Point plot: ค่าเฉลี่ยบิลร้านอาหาร เปรียบเทียบผู้สูบและไม่สูบบุหรี่

ทั้งคู่แสดง:
ความแตกต่าง:
ทั้งคู่แสดง:


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 เบื้องต้น