docstr: Callback to register with 'draw_event'.
docstr_tok: ["Callback","to","register","with","'draw_event","'","."]
code: def on_draw(self, event):
      """Callback to register with 'draw_event'."""
      cv = self.canvas
      if event is not None:
          if event.canvas != cv:
              raise RuntimeError
      self._bg = cv.copy_from_bbox(cv.figure.bbox)
      self._draw_animated()
  
file_path: matplotlib/galleries/users_explain/animations/blitting.py
imports: import matplotlib.pyplot
  import numpy
label_desc: Use image node_id 2 for calling the BlitManager obj's underlying member method code with example usage: obj.on_draw(event) without return types