การสร้างภาพข้อมูลระดับกลางด้วย Seaborn
Chris Moffitt
Instructor


FacetGrid เป็นพื้นฐานของกราฟแบบ grid หลายประเภทFacetGrid แล้ว ต้องกำหนดประเภทกราฟให้กับ gridg = sns.FacetGrid(df, col='HIGHDEG')
g.map(sns.boxplot, 'Tuition',
order=['1', '2', '3', '4'])

catplot เป็นวิธีที่ง่ายกว่าในการใช้ FacetGrid กับข้อมูลเชิงหมวดหมู่sns.catplot(x="Tuition", data=df,
col="HIGHDEG", kind="box")

FacetGrid() ใช้กับกราฟแบบ scatter หรือ regression ได้เช่นกันg = sns.FacetGrid(df, col='HIGHDEG')
g.map(plt.scatter, 'Tuition', 'SAT_AVG_ALL')

lmplot พล็อตกราฟ scatter และ regression บน FacetGridsns.lmplot(data=df, x="Tuition", y="SAT_AVG_ALL",
col="HIGHDEG", fit_reg=False)

sns.lmplot(data=df, x="Tuition", y="SAT_AVG_ALL",
col="HIGHDEG", row="REGION")

การสร้างภาพข้อมูลระดับกลางด้วย Seaborn