From 071829dbc9de152bbb1c8c39282bbc5608ce051d Mon Sep 17 00:00:00 2001 From: "J.L. Cercos-Pita" Date: Sun, 31 May 2015 19:28:16 +0200 Subject: [PATCH] Fixed 'Axes' object has no attribute 'get_frame' error (see http://matplotlib.org/api/api_changes.html) --- src/Mod/Plot/Plot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Plot/Plot.py b/src/Mod/Plot/Plot.py index 723b85453..54a70b918 100644 --- a/src/Mod/Plot/Plot.py +++ b/src/Mod/Plot/Plot.py @@ -192,7 +192,10 @@ def legend(status=True, pos=None, fontsize=None): # Update canvas in order to compute legend data plt.canvas.draw() # Get resultant position - fax = axes.get_frame().get_extents() + try: + fax = axes.get_frame().get_extents() + except: + fax = axes.patch.get_extents() fl = l.get_frame() plt.legPos = ( (fl._x + fl._width - fax.x0) / fax.width,