class_docstr: This is the matplotlib based GUI for a single analysis
  It assumes the analysis is simple image data (this could be abstracted)
class_docstr_tok: ["This","is","the","matplotlib","based","GUI","for","a","single","analysis","It","assumes","the","analysis","is","simple","image","data","(","this","could","be","abstracted",")"]
code: def __init__(self, width=5, height=5):
      DrawingCursors.init_cursors()
      self.fig = Figure(figsize=(width, height))
      self.ax = self.fig.add_subplot(111)
      self.ax.set_xticks([])
      self.ax.set_yticks([])
      mplstyle.use("fast")
      super(EmbeddingGui, self).__init__(self.fig)
      self.fig.tight_layout(pad=0)
      self.fig.canvas.setFocusPolicy(QtCore.Qt.ClickFocus)
      self.fig.canvas.setFocus()
      self.draw_state = (DrawingMode.NoDraw, DrawingShape.NoShape)
      self.selection_mask = np.full((0, 0), False)
      self.in_selection = False
      self.facecolors = None
      self.scatter = None
      self.active_selector = None
      self.setWhatsThis(
          """
      Select keys:
      ============
      A - select all
      D - remove selection
      I - invert selection
  
      Shaped selector keys:
      =====================
      E - ellipse
      L - lasso
      P - polygon
      R - rectangle
      Space - remove selector
  
      Selector modifier keys
      ======================
      <Shift> + <selector key> - add selection
      <Ctrl> + <selector key> - subtract selection
              """
      )
      self.selectors = {}
      self.embedding = None
      plt.show(block=False)
  
imports: import io
  from enum import Enum
  import numpy
  import matplotlib.pyplot
  import matplotlib.style
  from matplotlib.widgets import RectangleSelector, LassoSelector, EllipseSelector, PolygonSelector
  from matplotlib.path import Path
  from matplotlib.backends.backend_qt5agg import FigureCanvas
  from matplotlib.figure import Figure
  from PyQt5 import QtWidgets, QtCore
  from cursors import DrawingCursors, DrawingShape, DrawingMode
label_desc: Use image node_id 1 to create a new EmbeddingGui object from inherited base classes: FigureCanvas with example: obj = EmbeddingGui(width, height)