docstr: Display a visualization of the results
docstr_tok: ["Display","a","visualization","of","the","results"]
code: def display(self, workspace, figure):
      """Display a visualization of the results"""
      from matplotlib.axes import Axes
      from matplotlib.lines import Line2D
      import matplotlib.cm
  
      if self.wants_objskeleton_graph:
          figure.set_subplots((2, 1))
      else:
          figure.set_subplots((1, 1))
      title = (
          "Branchpoints of %s and %s\nTrunks are red\nBranches are green\nEndpoints are blue"
          % (self.seed_objects_name.value, self.image_name.value)
      )
      figure.subplot_imshow(
          0, 0, workspace.display_data.branchpoint_image, title
      )
      if self.wants_objskeleton_graph:
          image = workspace.display_data.intensity_image
          figure.subplot_imshow_grayscale(
              1,
              0,
              image,
              title="ObjectSkeleton graph",
              sharexy=figure.subplot(0, 0),
          )
          axes = figure.subplot(1, 0)
          assert isinstance(axes, Axes)
          edge_graph = workspace.display_data.edge_graph
          vertex_graph = workspace.display_data.vertex_graph
          i = vertex_graph["i"]
          j = vertex_graph["j"]
          kind = vertex_graph["kind"]
          brightness = (
              edge_graph["total_intensity"] / edge_graph["length"]
          )
          brightness = (brightness - numpy.min(brightness)) / (
              numpy.max(brightness) - numpy.min(brightness) + 0.000001
          )
          cm = matplotlib.cm.get_cmap(get_default_colormap())
          cmap = matplotlib.cm.ScalarMappable(cmap=cm)
          edge_color = cmap.to_rgba(brightness)
          for idx in range(len(edge_graph["v1"])):
              v = numpy.array(
                  [edge_graph["v1"][idx] - 1, edge_graph["v2"][idx] - 1]
              )
              line = Line2D(j[v], i[v], color=edge_color[idx])
              axes.add_line(line)
  
imports: import os
  import centrosome.cpmorphology
  import centrosome.propagate
  import numpy
  import scipy.ndimage
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.image import Image
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import ABSOLUTE_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_INPUT_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_INPUT_SUBFOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_SUBFOLDER_NAME
  from cellprofiler_core.preferences import get_default_colormap
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting.subscriber import LabelSubscriber, ImageSubscriber
  from cellprofiler_core.setting.text import ImageName, Directory
  from cellprofiler_core.setting.text import Integer
  from cellprofiler_core.setting.text import Text
  from cellprofiler_core.utilities.core.object import size_similarly
  from centrosome.cpmorphology import fixup_scipy_ndimage_result
  from scipy.ndimage import grey_dilation, grey_erosion
label_desc: Use image node_id 8 for calling the MeasureObjectSkeleton obj's underlying member method code with example usage: obj.display(workspace, figure) without return types