docstr: Display an array of single measurements
docstr_tok: ["Display","an","array","of","single","measurements"]
code: def display_single_measurement(self, workspace, figure):
      """Display an array of single measurements"""
      figure.set_subplots((3, len(self.single_measurements)))
      for i, group in enumerate(self.single_measurements):
          bin_hits = workspace.display_data.bins[i]
          labels = workspace.display_data.labels[i]
          values = workspace.display_data.values[i]
          if len(values) == 0:
              continue
          #
          # A histogram of the values
          #
          axes = figure.subplot(0, i)
          axes.hist(values[~numpy.isnan(values)])
          axes.set_xlabel(group.measurement.value)
          axes.set_ylabel("# of %s" % group.object_name.value)
          #
          # A histogram of the labels yielding the bins
          #
          axes = figure.subplot(1, i)
          axes.hist(
              bin_hits,
              bins=group.number_of_bins(),
              range=(0.5, group.number_of_bins() + 0.5),
          )
          axes.set_xticks(numpy.arange(1, group.number_of_bins() + 1))
          if group.wants_custom_names:
              axes.set_xticklabels(group.bin_names.value.split(","))
          axes.set_xlabel(group.measurement.value)
          axes.set_ylabel("# of %s" % group.object_name.value)
          colors = self.get_colors(len(axes.patches))
          for j, patch in enumerate(axes.patches):
              patch.set_facecolor(colors[j + 1, :])
          #
          # The labels matrix
          #
          figure.subplot_imshow_labels(
              2,
              i,
              labels,
              title=group.object_name.value,
              sharexy=figure.subplot(2, 0),
          )
  
imports: import functools
  import os
  import numpy
  from cellprofiler.modules import _help
  from cellprofiler.utilities.rules import Rules
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, COLTYPE_VARCHAR, C_COUNT, C_CHILDREN, C_LOCATION, C_NUMBER, C_PARENT, FTR_OBJECT_NUMBER, FTR_CENTER_X, FTR_CENTER_Y, FTR_CENTER_Z
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects
  from cellprofiler_core.preferences import get_default_colormap, get_headless
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import Divider
  from cellprofiler_core.setting import HiddenCount
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.setting import SettingsGroup
  from cellprofiler_core.setting import ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething
  from cellprofiler_core.setting.do_something import RemoveSettingButton
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import Alphanumeric, Directory, Filename, LabelName
  from cellprofiler_core.setting.text import Float
  from cellprofiler_core.setting.text import ImageName
  from cellprofiler_core.setting.text import Integer
  from cellprofiler_core.setting.text import Text
  from cellprofiler_core.constants.measurement import FF_CHILDREN_COUNT
  from cellprofiler_core.constants.measurement import FF_COUNT
  from cellprofiler_core.constants.measurement import FF_PARENT
  from cellprofiler_core.module.image_segmentation import ImageSegmentation
label_desc: Use image node_id 14 for calling the ClassifyObjects obj's underlying member method code with example usage: obj.display_single_measurement(workspace, figure) without return types