From 78453825337bb5a50a8c29c8dfab0f1442ebdcc2 Mon Sep 17 00:00:00 2001 From: Alexis de Almeida Coutinho Date: Tue, 1 Dec 2020 16:37:47 -0300 Subject: [PATCH 1/2] Fix kwargs handling in AnnotationBbox --- lib/matplotlib/offsetbox.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py index d2c3a42a1633..00f6a406cfee 100644 --- a/lib/matplotlib/offsetbox.py +++ b/lib/matplotlib/offsetbox.py @@ -1380,7 +1380,7 @@ def __init__(self, offsetbox, xy, Other parameters are identical to `.Annotation`. """ - martist.Artist.__init__(self, **kwargs) + martist.Artist.__init__(self) mtext._AnnotationBase.__init__(self, xy, xycoords=xycoords, @@ -1424,6 +1424,9 @@ def __init__(self, offsetbox, xy, if bboxprops: self.patch.set(**bboxprops) + if len(kwargs): + self.update(kwargs) + @property def xyann(self): return self.xybox From 1e16181eb51da20967af197bd53d9bdfe07459f6 Mon Sep 17 00:00:00 2001 From: Alexis de Almeida Coutinho Date: Tue, 1 Dec 2020 22:38:33 -0300 Subject: [PATCH 2/2] Update lib/matplotlib/offsetbox.py Co-authored-by: Elliott Sales de Andrade --- lib/matplotlib/offsetbox.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py index 00f6a406cfee..dcf7d9c7c34e 100644 --- a/lib/matplotlib/offsetbox.py +++ b/lib/matplotlib/offsetbox.py @@ -1424,8 +1424,7 @@ def __init__(self, offsetbox, xy, if bboxprops: self.patch.set(**bboxprops) - if len(kwargs): - self.update(kwargs) + self.update(kwargs) @property def xyann(self): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy