From 72e8978d1bb665734cc8a9bfd740aad5622ed8a1 Mon Sep 17 00:00:00 2001 From: "Christine P. Chai" Date: Fri, 14 Feb 2025 15:12:02 -0800 Subject: [PATCH] Backport PR #29617: DOC: Add docstrings to matplotlib.cbook.GrouperView --- lib/matplotlib/cbook.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index da7a122b0968..bb2ea311430e 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -880,8 +880,18 @@ class GrouperView: def __init__(self, grouper): self._grouper = grouper def __contains__(self, item): return item in self._grouper def __iter__(self): return iter(self._grouper) - def joined(self, a, b): return self._grouper.joined(a, b) - def get_siblings(self, a): return self._grouper.get_siblings(a) + + def joined(self, a, b): + """ + Return whether *a* and *b* are members of the same set. + """ + return self._grouper.joined(a, b) + + def get_siblings(self, a): + """ + Return all of the items joined with *a*, including itself. + """ + return self._grouper.get_siblings(a) def simple_linear_interpolation(a, steps):