def update(self, i):
    """Update the scatter plot."""
dataX, dataY = next(self.stream)
self.scat = self.ax.scatter(dataX, dataY, c='tomato', s=20, animated=True)
Animated scatterplot of data with Matplotlib