skrf.plotting.scrape_legend(n=None, ax=None)[source]

Scrape a legend with redundant labels.

Given a legend of m entries of n groups, this will remove all but every m/nth entry. This is used when you plot many lines representing the same thing, and only want one label entry in the legend for the whole ensemble of lines.

  • n (int or None, optional.) – Default is None.

  • ax (matplotlib.Axes or None, optional) – axis to operate on. Default is None for current axe gca()