MulaiMulai sekarang secara gratis

Bivariate plots in seaborn

Boxplots can be used on univariate or bivariate data. We use boxplots when we have a numeric variable and a categorical variable. Scatter plots are used when we have two numeric variables.

For boxplots and scatter plots, we can use the boxplot() and regplot() methods.

Latihan ini adalah bagian dari kursus

Python for R Users

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

import seaborn as sns
import matplotlib.pyplot as plt

# Boxplot for tip by sex
sns.____(____=____, ____=____, data=tips)
plt.show()
Edit dan Jalankan Kode