Fixed 'Axes' object has no attribute 'get_frame' error (see http://matplotlib.org/api/api_changes.html)
This commit is contained in:
parent
2e14552a50
commit
071829dbc9
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user