From b71dedcf225cc3ac475f39314cc0715b4b9a4940 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Wed, 7 Apr 2021 11:34:06 +0200 Subject: [PATCH] Include length in ArtistList repr. Previously, printing e.g. `ax.lines` would show a bunch of ``. Now it's all hidden between an ``, which is useful in itself; but displaying the length of the list (which is the main thing that could be seen from the `[` representation) is useful at least for debugging purposes. --- lib/matplotlib/axes/_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 3b531f868254..8397d7d334f3 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -1347,7 +1347,7 @@ def __init__(self, axes, prop_name, add_name, ) def __repr__(self): - return f'' + return f'' def __len__(self): return sum(self._type_check(artist)