legend with scatter

Emmanuel Favre-Nicolin <manouchk@...287...> writes:

when I use legend() with a scatter plot I obtain an empty legend.

This looks like a bug in legend. The following change adds the legend
in your test script, but I wonder if it breaks something else; I guess
there must have been a good reason to exclude some non-LineCollections
from the handles.

The patch also highlights some repetition of code: I was first trying
to fix the problem in legend.py, but it didn't work since it is
actually the code in axes.py that builds up the legend. I wonder if
one of these occurrences should be removed?

legend.patch (956 Bytes)