From fb49e1175136707c7c223e350506433fec65872c Mon Sep 17 00:00:00 2001 From: Importance of Being Ernest Date: Sun, 29 Oct 2017 18:31:27 +0100 Subject: [PATCH] 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). --- lib/mpl_toolkits/axes_grid1/inset_locator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mpl_toolkits/axes_grid1/inset_locator.py b/lib/mpl_toolkits/axes_grid1/inset_locator.py index d3188dff9b73..98f1402ec09f 100644 --- a/lib/mpl_toolkits/axes_grid1/inset_locator.py +++ b/lib/mpl_toolkits/axes_grid1/inset_locator.py @@ -578,8 +578,9 @@ def mark_inset(parent_axes, inset_axes, loc1, loc2, **kwargs): The patches connecting two corners of the inset axes and its area. """ rect = TransformedBbox(inset_axes.viewLim, parent_axes.transData) - - pp = BboxPatch(rect, fill=False, **kwargs) + + fill = kwargs.pop("fill", False) + pp = BboxPatch(rect, fill=fill, **kwargs) parent_axes.add_patch(pp) p1 = BboxConnector(inset_axes.bbox, rect, loc1=loc1, **kwargs)