Skip to content

Commit

Permalink
Fixed 'Axes' object has no attribute 'get_frame' error (see http://ma…
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinariojoe committed May 31, 2015
1 parent 2e14552 commit 071829d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mod/Plot/Plot.py
Expand Up @@ -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,
Expand Down

0 comments on commit 071829d

Please sign in to comment.