Premium problem32. Scatter by Category

Medium Locked

Every point has a category in labels. Plot each category as its own scatter series so the legend can name them, taking the categories in sorted order, and show the legend.

Return the Axes. A single scatter call cannot produce a per-category legend, which is why the points have to be split first.

Premium problem

This one's part of Premium. Unlock the full Matplotlib track plus every other premium problem on the site.

Implement solve(...)