docstr: Set the axes limits appropriate to the images we have
docstr_tok: ["Set","the","axes","limits","appropriate","to","the","images","we","have"]
code: def scale_axes(self):
      """Set the axes limits appropriate to the images we have"""
      max_x = max_y = 0
      for image_row in self.image_rows:
          if image_row.data.mode != MODE_HIDE:
              shape = image_row.data.pixel_data.shape
              max_x = max(shape[1], max_x)
              max_y = max(shape[0], max_y)
      if self.__axes_scale is not None:
          init_x, init_y = self.__axes_scale
          if float(max_x) != init_x[1] or float(max_y) != init_y[0]:
              self.__axes_scale = None
              self.frame.navtoolbar._nav_stack.clear()
          elif (
              init_x != self.axes.get_xlim()
              or init_y != self.axes.get_ylim()
          ):
              return
      if max_x > 0 and max_y > 0:
          self.axes.set_xlim(0, max_x)
          self.axes.set_ylim(0, max_y)
          self.axes.invert_yaxis()
          self.__axes_scale = ((0.0, float(max_x)), (float(max_y), 0.0))
          self.frame.navtoolbar.reset()
  
imports: import matplotlib
  import matplotlib.axes
  import numpy
  import wx
  import wx.lib.scrolledpanel
  from cellprofiler_core.constants.measurement import EXPERIMENT
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_X
  from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_Y
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.preferences import IM_BILINEAR
  from cellprofiler_core.preferences import get_primary_outline_color
  from cellprofiler_core.preferences import get_secondary_outline_color
  from cellprofiler_core.preferences import get_tertiary_outline_color
  from cellprofiler_core.preferences import IM_NEAREST
  from cellprofiler_core.preferences import get_interpolation_mode
  from ..artist import INTERPOLATION_BILINEAR
  from ..artist import INTERPOLATION_NEAREST
  from ..artist import INTERPOLATION_BICUBIC
  from ..artist import MODE_HIDE
  from ..artist import CPImageArtist
  from ..constants.workspace_view import C_CHOOSER, WORKSPACE_VIEWER_HELP
  from ..constants.workspace_view import C_COLOR
  from ..constants.workspace_view import C_SHOW
  from ..constants.workspace_view import C_REMOVE
  from ..help.content import FIGURE_HELP
  from ..html.utils import rst_to_html_fragment
  from ..htmldialog import HTMLDialog
  from ._workspace_view_figure import WorkspaceViewFigure
  from ._workspace_view_image_row import WorkspaceViewImageRow
  from ._workspace_view_mask_row import WorkspaceViewMaskRow
  from ._workspace_view_measurement_row import WorkspaceViewMeasurementRow
  from ._workspace_view_objects_row import WorkspaceViewObjectsRow
label_desc: Use image node_id 2 for calling the WorkspaceView obj's underlying member method code with example usage: obj.scale_axes() without return types