From 3b2d70b0514f660936c92b108f0dd42902de115e Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Sun, 10 Sep 2023 20:59:48 -0400 Subject: [PATCH] Remove legend_func class attribute --- seaborn/_base.py | 5 +---- seaborn/categorical.py | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/seaborn/_base.py b/seaborn/_base.py index 7d7ff6490e..7b70fdc7a7 100644 --- a/seaborn/_base.py +++ b/seaborn/_base.py @@ -1203,7 +1203,7 @@ def _add_axis_labels(self, ax, default_x="", default_y=""): ax.set_ylabel(self.variables.get("y", default_y), visible=y_visible) def add_legend_data( - self, ax, func=None, common_kws=None, attrs=None, semantic_kws=None, + self, ax, func, common_kws=None, attrs=None, semantic_kws=None, ): """Add labeled artists to represent the different plot semantics.""" verbosity = self.legend @@ -1247,9 +1247,6 @@ def update(var_name, val_name, **kws): update, var, verbosity, title, title_kws, names, semantic_kws.get(var), ) - if func is None: - func = self._legend_func - legend_data = {} legend_order = [] diff --git a/seaborn/categorical.py b/seaborn/categorical.py index 96d060caa4..e61637e3bf 100644 --- a/seaborn/categorical.py +++ b/seaborn/categorical.py @@ -45,7 +45,6 @@ class _CategoricalPlotter(VectorPlotter): wide_structure = {"x": "@columns", "y": "@values"} flat_structure = {"y": "@values"} - _legend_func = "scatter" _legend_attributes = ["color"] def __init__(