From dc49915a50ccbd780cc088bd5b6c0ad51e5783d9 Mon Sep 17 00:00:00 2001 From: zhoubecky Date: Mon, 5 Mar 2018 11:05:28 -0500 Subject: [PATCH 1/2] fix BboxConnectorPatch-fill --- lib/mpl_toolkits/axes_grid1/inset_locator.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/mpl_toolkits/axes_grid1/inset_locator.py b/lib/mpl_toolkits/axes_grid1/inset_locator.py index 08e80ee03817..e962b4745b54 100644 --- a/lib/mpl_toolkits/axes_grid1/inset_locator.py +++ b/lib/mpl_toolkits/axes_grid1/inset_locator.py @@ -309,7 +309,12 @@ def __init__(self, bbox1, bbox2, loc1, loc2=None, **kwargs): raise ValueError("transform should not be set") kwargs["transform"] = IdentityTransform() - Patch.__init__(self, fill=False, **kwargs) + if 'fill' in kwargs: + Patch.__init__(self, **kwargs) + else: + fill = ('fc' in kwargs) or ('facecolor' in kwargs) or ('color' in kwargs) + Patch.__init__(self, fill=fill, **kwargs) + #Patch.__init__(self, fill=False, **kwargs) self.bbox1 = bbox1 self.bbox2 = bbox2 self.loc1 = loc1 @@ -579,7 +584,8 @@ def mark_inset(parent_axes, inset_axes, loc1, loc2, **kwargs): """ rect = TransformedBbox(inset_axes.viewLim, parent_axes.transData) - fill = kwargs.pop("fill", False) + #fill = kwargs.pop("fill", False) + fill = ('fc' in kwargs) or ('facecolor' in kwargs) or ('color' in kwargs) pp = BboxPatch(rect, fill=fill, **kwargs) parent_axes.add_patch(pp) From 25a4bb5172b0b4f1db42b51417e69056b013adee Mon Sep 17 00:00:00 2001 From: zhoubecky Date: Mon, 5 Mar 2018 11:34:47 -0500 Subject: [PATCH 2/2] remove command --- lib/mpl_toolkits/axes_grid1/inset_locator.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/mpl_toolkits/axes_grid1/inset_locator.py b/lib/mpl_toolkits/axes_grid1/inset_locator.py index e962b4745b54..9b6ede191d84 100644 --- a/lib/mpl_toolkits/axes_grid1/inset_locator.py +++ b/lib/mpl_toolkits/axes_grid1/inset_locator.py @@ -314,7 +314,6 @@ def __init__(self, bbox1, bbox2, loc1, loc2=None, **kwargs): else: fill = ('fc' in kwargs) or ('facecolor' in kwargs) or ('color' in kwargs) Patch.__init__(self, fill=fill, **kwargs) - #Patch.__init__(self, fill=False, **kwargs) self.bbox1 = bbox1 self.bbox2 = bbox2 self.loc1 = loc1 @@ -584,7 +583,6 @@ def mark_inset(parent_axes, inset_axes, loc1, loc2, **kwargs): """ rect = TransformedBbox(inset_axes.viewLim, parent_axes.transData) - #fill = kwargs.pop("fill", False) fill = ('fc' in kwargs) or ('facecolor' in kwargs) or ('color' in kwargs) pp = BboxPatch(rect, fill=fill, **kwargs) parent_axes.add_patch(pp)