การใช้ JointGrid และ jointplot

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

Chris Moffitt

Instructor

ภาพรวม JointGrid()

ภาพรวม JointGrid

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

JointGrid เบื้องต้น

g = sns.JointGrid(data=df, x="Tuition", y="ADM_RATE_ALL") 
g.plot(sns.regplot, sns.histplot)

ตัวอย่าง JointGrid

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

JointGrid ขั้นสูง

g = sns.JointGrid(data=df, x="Tuition", y="ADM_RATE_ALL") 
g = g.plot_joint(sns.kdeplot)
g = g.plot_marginals(sns.kdeplot, shade=True)

ตัวอย่าง JointGrid พร้อมคำอธิบาย

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

jointplot()

sns.jointplot(data=df, x="Tuition", y="ADM_RATE_ALL", kind='hex')

ตัวอย่าง jointplot

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

ปรับแต่ง jointplot

g = (sns.jointplot(x="Tuition",
                   y="ADM_RATE_ALL",
                   kind="scatter",
                   xlim=(0, 25000),
                   data=df.query('UG < 2500 &
                   Ownership == "Public"'))
    .plot_joint(sns.kdeplot))
การสร้างภาพข้อมูลระดับกลางด้วย Seaborn

ปรับแต่ง jointplot

jointplot

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

มาฝึกกันเถอะ!

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

Preparing Video For Download...