Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb49e11

Browse files
Do not hardcode fill=False in mark_inset
There should not be any reason to hardcode fill=False in `mark_inset`. This prevents having a filled Bbox_Patch. With the proposed change, something like `mark_inset(ax,axins,loc1=1,loc2=3, fill=True, edgecolor="k", facecolor="lightgrey")` will again be possible (it was in v1.3 but got broken at some point).
1 parent b0a0a8e commit fb49e11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/mpl_toolkits/axes_grid1/inset_locator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,9 @@ def mark_inset(parent_axes, inset_axes, loc1, loc2, **kwargs):
578578
The patches connecting two corners of the inset axes and its area.
579579
"""
580580
rect = TransformedBbox(inset_axes.viewLim, parent_axes.transData)
581-
582-
pp = BboxPatch(rect, fill=False, **kwargs)
581+
582+
fill = kwargs.pop("fill", False)
583+
pp = BboxPatch(rect, fill=fill, **kwargs)
583584
parent_axes.add_patch(pp)
584585

585586
p1 = BboxConnector(inset_axes.bbox, rect, loc1=loc1, **kwargs)

0 commit comments

Comments
 (0)