alexras/boomslang — Issue #11: "UserWarning: Legend does not support" message (matplotlib 1.1.0)
Author: alexras
Created: 2012-02-15 23:19:09+00:00
State: open

From ywkang80:

I have got the following error message, while running the example that has two lines with error bars on the Examples page. I am using matplotlib 1.1.0, and python 2.7 on Mac OS/X Lion

"matplotlib/legend.py:610: UserWarning: Legend does not support [] Use proxy artist instead."

It happens when the following line in Plot class is called.

legend = legendAxis.legend(plotHandles, plotLabels,
loc=self.legendLoc, **legendKeywords)

Maybe the changes in Legend processing in matplotlib 1.1.0 cause this error. It seems to me that matplotlib couldn't find the legend_handler for line2d objects.

I fixed this problem by just removing the 'plotHandles' argument. It works for the charts I'm currently generating with bloomslang; Clustered Bar, Line, and Bar charts . But I'm not sure it's the right way to workaround this error. (FigLegend works as expected without any change.)