def animate(self, at): [self.bar_collections[i].set_height(self.arr[at][i]) for i in range(len(self.bar_collections))] # self.fig.canvas.draw() # forces canavas to draw a frame