code: def run(self, workspace):
      m = workspace.get_measurements()
      if self.x_source.value == self.y_source.value:
          if self.x_source.value == IMAGE:
              xvals = m.get_all_measurements(IMAGE, self.x_axis.value)
              yvals = m.get_all_measurements(IMAGE, self.y_axis.value)
              xvals, yvals = numpy.array(
                  [
                      (
                          x if numpy.isscalar(x) else x[0],
                          y if numpy.isscalar(y) else y[0],
                      )
                      for x, y in zip(xvals, yvals)
                      if (x is not None) and (y is not None)
                  ]
              ).transpose()
              title = "%s" % self.title.value
          else:
              xvals = m.get_current_measurement(
                  self.get_x_object(), self.x_axis.value
              )
              yvals = m.get_current_measurement(
                  self.get_y_object(), self.y_axis.value
              )
              title = "%s (cycle %d)" % (
                  self.title.value,
                  workspace.measurements.image_set_number,
              )
      else:
          if self.x_source.value == IMAGE:
              xvals = m.get_all_measurements(IMAGE, self.x_axis.value)
              yvals = m.get_current_measurement(
                  self.get_y_object(), self.y_axis.value
              )
              xvals = numpy.array([xvals[0]] * len(yvals))
          else:
              xvals = m.get_current_measurement(
                  self.get_x_object(), self.x_axis.value
              )
              yvals = m.get_all_measurements(IMAGE, self.y_axis.value)
              yvals = numpy.array([yvals[0]] * len(xvals))
          xvals, yvals = numpy.array(
              [
                  (
                      x if numpy.isscalar(x) else x[0],
                      y if numpy.isscalar(y) else y[0],
                  )
                  for x, y in zip(xvals, yvals)
                  if (x is not None) and (y is not None)
              ]
          ).transpose()
  
      if self.show_window:
          workspace.display_data.xvals = xvals
          workspace.display_data.yvals = yvals
  
file_path: CellProfiler/src/frontend/cellprofiler/modules/displayscatterplot.py
imports: import numpy
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import Text
label_desc: Use image node_id 6 for calling the DisplayScatterPlot obj's underlying member method code with example usage: obj.run(workspace) without return types