code: def display_on_figure(self, workspace, axes, imshow_fn):
      if self.use_color_map():
          labels = workspace.display_data.labels
          if self.wants_image:
              pixel_data = workspace.display_data.pixel_data
          else:
              pixel_data = (labels != 0).astype(numpy.float32)
          if pixel_data.ndim == 3:
              pixel_data = (
                  numpy.sum(pixel_data, 2) / pixel_data.shape[2]
              )
          colormap_name = self.colormap.value
          if colormap_name == "Default":
              colormap_name = get_default_colormap()
          colormap = matplotlib.cm.get_cmap(colormap_name)
          values = workspace.display_data.values
          vmask = workspace.display_data.mask
          colors = numpy.ones((len(vmask) + 1, 4))
          colors[1:][~vmask, :3] = 1
          sm = matplotlib.cm.ScalarMappable(cmap=colormap)
          if self.color_map_scale_choice == CMS_MANUAL:
              sm.set_clim(
                  self.color_map_scale.min, self.color_map_scale.max
              )
          sm.set_array(values)
          colors[1:][vmask, :] = sm.to_rgba(values)
          img = colors[labels, :3] * pixel_data[:, :, numpy.newaxis]
          imshow_fn(img)
          assert isinstance(axes, matplotlib.axes.Axes)
          figure = axes.get_figure()
          assert isinstance(figure, matplotlib.figure.Figure)
          figure.colorbar(sm, ax=axes)
      else:
          imshow_fn(workspace.display_data.pixel_data)
          for x, y, value in zip(
              workspace.display_data.x,
              workspace.display_data.y,
              workspace.display_data.values,
          ):
              if self.sci_notation:
                  svalue = f"{value:.{self.decimals.value}e}"
              else:
                  try:
                      svalue = "%.*f" % (self.decimals.value, value)
                  except:
                      svalue = str(value)
              text = matplotlib.text.Text(
                  x=x,
                  y=y,
                  text=svalue,
                  size=self.font_size.value,
                  color=self.text_color.value,
                  verticalalignment="center",
                  horizontalalignment="center",
                  fontname=self.font_choice.value,
                  weight=self.font_weight.value,
              )
              axes.add_artist(text)
  
imports: import matplotlib.axes
  import matplotlib.cm
  import matplotlib.figure
  import matplotlib.text
  import numpy
  from cellprofiler_core.constants.measurement import C_FILE_NAME
  from cellprofiler_core.constants.measurement import C_PATH_NAME
  from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_X
  from cellprofiler_core.constants.measurement import M_LOCATION_CENTER_Y
  from cellprofiler_core.image import FileImage
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import get_default_colormap
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import Color
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.choice import Colormap
  from cellprofiler_core.setting.range import FloatRange
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import ImageName
  from cellprofiler_core.setting.text import Integer
label_desc: Use image node_id 8 for calling the DisplayDataOnImage obj's underlying member method code with example usage: obj.display_on_figure(workspace, axes, imshow_fn) without return types