Я новичок в matplotlib / Python и строю анимированный точечный график.Я хочу разместить кнопку под графиком, чтобы пользователь мог запустить / приостановить / возобновить анимацию.Это сюжет (я знаю, что это беспорядок, все еще работает над ним): 
В качестве начала я попытался добавить кнопку с именем Play, чтобы воспроизвести анимацию после ее первогоавтоматическое выполнение, но у меня возникают проблемы с пониманием того, как работает его размещение под графиком, поскольку оно «перетаскивает» все вместе с ним (заголовок, xlabel, ylabel и т. д.): 
Вот код:
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import mplcursors
from matplotlib.animation import FuncAnimation
from matplotlib.widgets import Slider, Button, RadioButtons
df = pd.read_excel('nations2.xls')
df.head()
uniqueYears = df['Ano'].unique()
font = {'family': 'sans-serif',
'color': 'black',
'weight': 'normal',
'size': 16,
}
fig, ax = plt.subplots()
def animate(frames):
ax.clear()
data = df[df['Ano'] == uniqueYears[frames]]
ax.scatter(y = data['ExpecVida'],
x = data['PIBperCapita'],
s = data['PopX1000']/40000,
c = data['Regiao'].astype('category').cat.codes,
cmap = cm.viridis,
edgecolors = 'none',
alpha = 0.5)
ax.set_xlim([0,50000], auto=True)
ax.set_ylim([0,100], auto=True)
plt.title('Wealth and Health of Nations', fontsize=18)
plt.xlabel('GDP per Capita ($)', fontsize=14)
plt.ylabel('Life Expectancy (years)', fontsize=14)
plt.grid(color = '#A9A9A9')
plt.text(2, 0.65, uniqueYears[frames], fontdict=font)
for i, txt in enumerate(data['Pais']):
ax.annotate(txt, (data['PIBperCapita'].iat[i], data['ExpecVida'].iat[i]), fontsize = 6)
anim = FuncAnimation(fig, animate, frames=len(uniqueYears),interval = 200, repeat=False)
class Index(object):
ind = 0
def play(self, event):
FuncAnimation(fig, animate, frames=len(uniqueYears),interval = 200, repeat=False)
callback = Index()
axplay = plt.axes([0.81, 0.05, 0.1, 0.075])
bplay = Button(axplay, 'Play')
bplay.on_clicked(callback.play)