From 62dec87e57afc9e2d73a5e900752ca30363d4081 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 31 Aug 2021 21:25:31 +0200 Subject: [PATCH] Remove unused HostAxes._get_legend_handles. There's no call to a `_get_legend_handles` method anywhere in the codebase; conversely, the `legend._get_legend_handles` function explicitly handles host/parasite axes already. --- lib/mpl_toolkits/axes_grid1/parasite_axes.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/mpl_toolkits/axes_grid1/parasite_axes.py b/lib/mpl_toolkits/axes_grid1/parasite_axes.py index a140be9ef260..b2ef0b1c94d3 100644 --- a/lib/mpl_toolkits/axes_grid1/parasite_axes.py +++ b/lib/mpl_toolkits/axes_grid1/parasite_axes.py @@ -187,12 +187,6 @@ def get_aux_axes(self, tr=None, viewlim_mode="equal", axes_class=Axes): ax2._remove_method = self.parasites.remove return ax2 - def _get_legend_handles(self, legend_handler_map=None): - all_handles = super()._get_legend_handles() - for ax in self.parasites: - all_handles.extend(ax._get_legend_handles(legend_handler_map)) - return all_handles - def draw(self, renderer): orig_children_len = len(self._children)