seaborn 的雙變量圖
盒鬚圖可以用在單變量或雙變量資料上。 當我們同時有數值變數與類別變數時,會使用盒鬚圖。 當我們有兩個數值變數時,會使用散佈圖。
對於盒鬚圖與散佈圖,可以分別使用 boxplot() 與 regplot() 方法。
本練習屬於課程
給 R 使用者的 Python
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
import seaborn as sns
import matplotlib.pyplot as plt
# Boxplot for tip by sex
sns.____(____=____, ____=____, data=tips)
plt.show()