開始使用免費開始

進階版 jointplot

jointplot 是許多 JointGrid 函式的便利包裝。 不過,你也可以把某些 JointGrid 繪圖覆蓋在標準的 jointplot 上。 在這個例子中,我們要比較被歸類為 casual 的騎乘者與 registered 的騎乘者,其分布有何不同。

本練習屬於課程

Seaborn 資料視覺化中級

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Create a jointplot of temp vs. casual riders
# Include a kdeplot over the scatter plot
g = sns.___(x="temp",
             y="casual",
             kind='___',
             data=df,
             marginal_kws=dict(bins=10))
g.plot_joint(sns.___)
    
plt.show()
plt.clf()
編輯並執行程式碼