code: def ax_update(self, ax):
      ax.set_autoscale_on(False)  # Otherwise, infinite loop
      # Get the number of points from the number of pixels in the window
      self.width, self.height = (
          ax.patch.get_window_extent().size.round().astype(int)
      )
      # Update the image object with our new data and extent
      ax.images[-1].set(
          data=self.compute_image(ax.get_xlim(), ax.get_ylim()),
          extent=(*ax.get_xlim(), *ax.get_ylim()),
      )
      ax.figure.canvas.draw_idle()
  
file_path: matplotlib/galleries/examples/event_handling/viewlims.py
imports: import functools
  import matplotlib.pyplot
  import numpy
  from matplotlib.patches import Rectangle
label_desc: Use image node_id 3 for calling the MandelbrotDisplay obj's underlying member method code with example usage: obj.ax_update(ax) without return types