FunctionRacerProblemsRace

Counts in a Chosen Order

MediumseabornPython

df has columns size (one of "S", "M", "L") and color. Draw a seaborn count plot with the sizes in the order S, M, L whatever order the rows come in, each size split into side by side bars by color, with the colors in alphabetical order. Use an ax you create and return the figure.

Checked: the bars, the x tick labels and the legend.

Example 1

df {"size":["L","S","M","S","L","L"],"color":["red","blue","red","red","blue","red"]}
draws
The chart to draw in example 1 of Counts in a Chosen Order

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