code: def activate_zoom(self):
      width, heigh = self.size
      gloo.set_viewport(0, 0, *self.physical_size)
      data_width = self._data_lim[0][1] - self._data_lim[0][0]
      data_height = self._data_lim[1][1] - self._data_lim[1][0]
      data_aspect = data_width / float(data_height)
      frame_aspect = width / float(height)
      if frame_aspect >= data_aspect:
          padding = (frame_aspect * data_height - data_width) / 2.0
          frame_lim = [
              [
                  self._data_lim[0][0] - padding,
                  self._data_lim[0][1] + padding,
              ],
              [self._data_lim[1][0], self._data_lim[1][1]],
          ]
      else:
          padding = (data_width / frame_aspect - data_height) / 2.0
          frame_lim = [
              [self._data_lim[0][0], self._data_lim[0][1]],
              [
                  self._data_lim[1][0] - padding,
                  self._data_lim[1][1] + padding,
              ],
          ]
      args_ortho = frame_lim[0][:: (1 if self._dir_x_right else -1)]
      args_ortho += frame_lim[1][:: (1 if self._dir_y_top else -1)]
      args_ortho += -1000, 1000
      self.projection = ortho(*args_ortho)
      self.program["projection"] = self.projection
  
file_path: vispy/examples/demo/gloo/unstructured_2d.py
imports: import sys
  import numpy
  import scipy.spatial
  from vispy import gloo, app
  from vispy.util.transforms import ortho
label_desc: Use image node_id 6 for calling the Canvas obj's underlying member method code with example usage: obj.activate_zoom() without return types