Session Ready
Exercise

Plotting joint distributions (2)

The seaborn function sns.jointplot() has a parameter kind to specify how to visualize the joint variation of two continuous random variables (i.e., two columns of a DataFrame)

  • kind='scatter' uses a scatter plot of the data points
  • kind='reg' uses a regression plot (default order 1)
  • kind='resid' uses a residual plot
  • kind='kde' uses a kernel density estimate of the joint distribution
  • kind='hex' uses a hexbin plot of the joint distribution

For this exercise, you will again use sns.jointplot() to display the joint distribution of the hp and mpg columns of the auto DataFrame. This time, you will use kind='hex' to generate a hexbin plot of the joint distribution.

Instructions
100 XP
  • Create a hexbin plot of the joint distribution between 'hp' and 'mpg'.