Here is a new solution that will build any collection of markers with the same label. I did not understand how to make it work with markers from a linear plot, but you can probably make a spread chart over a line if you need to.
from matplotlib import pyplot as plt import matplotlib.collections as mcol import matplotlib.transforms as mtransforms import numpy as np from matplotlib.legend_handler import HandlerPathCollection from matplotlib import cm class HandlerMultiPathCollection(HandlerPathCollection): """ Handler for PathCollections, which are used by scatter """ def create_collection(self, orig_handle, sizes, offsets, transOffset): p = type(orig_handle)(orig_handle.get_paths(), sizes=sizes, offsets=offsets, transOffset=transOffset, ) return p fig, ax = plt.subplots()

I have a solution for you if you want to use all circles for markers and distinguish only by color. You can use the collection of circles to represent markers, and then have a legend label for the collection as a whole.
Code example:
import matplotlib.pyplot as plt import matplotlib.collections as collections from matplotlib import cm import numpy as np

Amy teeharden
source share