diff --git a/src/tikzplotlib/_util.py b/src/tikzplotlib/_util.py index 8391221c..c9a136f0 100644 --- a/src/tikzplotlib/_util.py +++ b/src/tikzplotlib/_util.py @@ -12,7 +12,7 @@ def get_legend_text(obj): if leg is None: return None - keys = [h.get_label() for h in leg.legendHandles if h is not None] + keys = [h.get_label() for h in leg.legend_handles if h is not None] values = [t.get_text() for t in leg.texts] label = obj.get_label()