From 6a67b8efee8658680c683066d7cc5fc615c7b231 Mon Sep 17 00:00:00 2001 From: ejmercier Date: Sun, 2 Oct 2022 20:45:30 -0400 Subject: [PATCH 1/3] Forwarded select Rectangle kwargs to the Conneciton patch --- lib/matplotlib/axes/_axes.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 7e2103003cad..e7bb983da688 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -474,11 +474,22 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None, if self.yaxis.get_inverted(): ey = 1 - ey xy_data = x + ex * width, y + ey * height + + blacklist = { + 'alpha', 'rasterized', 'transform', + 'color', 'facecolor', 'url', + 'hatch', 'in_layout', 'path_effects'} + + patch_kwargs = { + key: val for key, val in kwargs.items() + if key not in blacklist} + p = mpatches.ConnectionPatch( xyA=xy_inset_ax, coordsA=inset_ax.transAxes, xyB=xy_data, coordsB=self.transData, arrowstyle="-", zorder=zorder, - edgecolor=edgecolor, alpha=alpha) + edgecolor=edgecolor, alpha=alpha, + **patch_kwargs) connects.append(p) self.add_patch(p) From d3328b0af051470eadf80ab9f9bc8587674f1fd8 Mon Sep 17 00:00:00 2001 From: Eric Mercier <73543301+ejmercier@users.noreply.github.com> Date: Sat, 15 Oct 2022 15:33:24 -0400 Subject: [PATCH 2/3] Update lib/matplotlib/axes/_axes.py Co-authored-by: Elliott Sales de Andrade --- lib/matplotlib/axes/_axes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index e7bb983da688..598fb8f4c3a1 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -475,7 +475,7 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None, ey = 1 - ey xy_data = x + ex * width, y + ey * height - blacklist = { + disallowed_keys = { 'alpha', 'rasterized', 'transform', 'color', 'facecolor', 'url', 'hatch', 'in_layout', 'path_effects'} From 81377123ab450d123afaf5e102db49af67caf7c0 Mon Sep 17 00:00:00 2001 From: Eric Mercier <73543301+ejmercier@users.noreply.github.com> Date: Sat, 15 Oct 2022 15:33:33 -0400 Subject: [PATCH 3/3] Update lib/matplotlib/axes/_axes.py Co-authored-by: Elliott Sales de Andrade --- lib/matplotlib/axes/_axes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 598fb8f4c3a1..1f55d912c007 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -482,7 +482,7 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None, patch_kwargs = { key: val for key, val in kwargs.items() - if key not in blacklist} + if key not in disallowed_keys} p = mpatches.ConnectionPatch( xyA=xy_inset_ax, coordsA=inset_ax.transAxes,