Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Python for R Users

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

import seaborn as sns
import matplotlib.pyplot as plt

# Boxplot for tip by sex
sns.____(____=____, ____=____, data=tips)
plt.show()
Code bewerken en uitvoeren