Skip to content

Commit c31fc6f

Browse files
committed
Forwarded select Rectangle kwargs to the Conneciton patch
1 parent e98d8d0 commit c31fc6f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,20 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
474474
if self.yaxis.get_inverted():
475475
ey = 1 - ey
476476
xy_data = x + ex * width, y + ey * height
477+
478+
blacklist={
479+
'alpha', 'rasterized', 'transform',
480+
'color', 'facecolor', 'url',
481+
'hatch', 'in_layout', 'path_effects'}
482+
483+
patch_kwargs = {key: val for key, val in kwargs.items() if key not in blacklist}
484+
477485
p = mpatches.ConnectionPatch(
478-
xyA=xy_inset_ax, coordsA=inset_ax.transAxes,
479-
xyB=xy_data, coordsB=self.transData,
486+
xyA=xy_inset_ax, coordsA=inset_ax.transAxes,
487+
xyB=xy_data, coordsB=self.transData,
480488
arrowstyle="-", zorder=zorder,
481-
edgecolor=edgecolor, alpha=alpha)
489+
edgecolor=edgecolor, alpha=alpha,
490+
**patch_kwargs)
482491
connects.append(p)
483492
self.add_patch(p)
484493

0 commit comments

Comments
 (0)