text: # -*- coding:utf-8 -*-
  """
  Project   : numpy
  File Name : 23_to_24_animation
  Author    : Focus
  Date      : 8/24/2021 1:28 AM
  Keywords  : mpl.animation
  Abstract  :
  Param     : 
  Usage     : py 23_to_24_animation
  Reference :
  """
  import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.animation as animation
  
  fig = plt.figure()
  ax = fig.add_subplot(111)
  N = 10
  x = np.random.rand(N)
  y = np.random.rand(N)
  z = np.random.rand(N)
  
  circles, triangles, dots = ax.plot(x, 'ro', y, "g^", z, "b.")
  ax.set_ylim(0, 1)
  plt.axis("off")
  
  def update(data):
      circles.set_ydata(data[0])
      triangles.set_ydata(data[1])
      return circles, triangles
  
  def generated():
      while True: yield np.random.rand(2, N)
  
  anim = animation.FuncAnimation(fig, update, generated, interval=150)
  
  plt.show()
  
  
  