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",")"]
docstr: Adjust the edge colors to reflect the selection
  and trigger the callbask
docstr_tok: ["Adjust","the","edge","colors","to","reflect","the","selection","and","trigger","the","callbask"]
code: def refresh_selection(self):
      """Adjust the edge colors to reflect the selection
      and trigger the callbask"""
      xys = self.scatter.get_offsets()
      # expand the single color case to give colors for all points
      # Set default edge colors same as face
      ec = self.scatter.get_facecolors()
      if ec.shape[0] == 1:
          ec = np.tile(ec, (xys.shape[0], 1))
      lw = np.full((ec.shape[0]), 1)
      # Set selected edge colors to dark grey and 2 thickness
      ec[self.selection_mask] = (0.05, 0.05, 0.05, 1)
      lw[self.selection_mask] = 2
      self.scatter.set_edgecolors(ec)
      self.scatter.set_linewidths(lw)
      self.fig.canvas.draw_idle()
      # Emit a permanent selection
      # return the current selection indexes
      self.on_selection(
          list(np.nonzero(self.selection_mask)[0]),
          SelectionEvent.PERMANENT,
      )
  
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 11 for calling the EmbeddingGui obj's underlying member method code with example usage: obj.refresh_selection() without return types