FunctionRacerProblemsRace

Colored by Group

EasyseabornPython

df has columns height, weight and sport. Draw a seaborn scatter plot of weight against height in which the color of each dot shows its sport. seaborn adds the legend. Draw it on a chart made with fig, ax = plt.subplots() by passing ax=ax, and return the figure.

Checked: the points, the legend and the legend title.

Example 1

df {"height":[150,160,170,180],"weight":[50,58,66,80],"sport":["run","swim","run","swim"]}
draws
The chart to draw in example 1 of Colored by Group

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More seaborn problems