diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index ab054599008a..06ecf4f2aabc 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3159,8 +3159,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, ``shownotches`` is also True. Otherwise, means will be shown as points. - Additional Options - --------------------- + Other Parameters + ---------------- The following boolean options toggle the drawing of individual components of the boxplots: - showcaps: the caps on the ends of whiskers diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index be93c05fbb11..0c71c73bce44 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -179,7 +179,6 @@ def update_from(self, other): self.set_linewidth(other.get_linewidth()) self.set_linestyle(other.get_linestyle()) self.set_transform(other.get_data_transform()) - self.set_figure(other.get_figure()) self.set_alpha(other.get_alpha()) def get_extents(self): diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py index a43231b964ee..a03489f095b9 100644 --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py @@ -240,6 +240,15 @@ def test_legend_stackplot(): ax.legend(loc=0) +@cleanup +def test_cross_figure_patch_legend(): + fig, ax = plt.subplots() + fig2, ax2 = plt.subplots() + + brs = ax.bar(range(3), range(3)) + fig2.legend(brs, 'foo') + + @cleanup def test_nanscatter(): fig, ax = plt.subplots()