Použití JointGrid a jointplot

Vizualizace dat se Seabornem pro pokročilé

Chris Moffitt

Instructor

Přehled JointGrid()

Přehled JointGrid

Vizualizace dat se Seabornem pro pokročilé

Základní JointGrid

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

Příklad JointGrid

Vizualizace dat se Seabornem pro pokročilé

Pokročilý 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)

Anotovaný příklad JointGrid

Vizualizace dat se Seabornem pro pokročilé

jointplot()

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

Příklad jointplot

Vizualizace dat se Seabornem pro pokročilé

Přizpůsobení 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))
Vizualizace dat se Seabornem pro pokročilé

Přizpůsobení jointplot

jointplot

Vizualizace dat se Seabornem pro pokročilé

Pojďme cvičit!

Vizualizace dat se Seabornem pro pokročilé

Preparing Video For Download...