parameters: (self)
docstring: Update the information window.
          Hide the information window for self.cellID == -1
docstring_summary: Update the information window.
          Hide the information window for self.cellID == -1
docstring_tokens: Update the information window . Hide the information window for self . cellID == - 1
function: def update(self):
          """Update the information window.
          Hide the information window for self.cellID == -1
          """
          try:
              if self.cellID > -1:
                  cell = self.mesh.cell(self.cellID)
                  center = cell.center()
                  x, y = center.x(), center.y()
                  marker = cell.marker()
                  data = self.data[self.cellID]
                  header = "Cell %d:\n" % self.cellID
                  header += "-" * (len(header) - 1)
                  istr = "\nx: {:.2f}\n y: {:.2f}\n data: {:.2e}\n marker: {:d}"
                  info = istr.format(x, y, data, marker)
                  text = header + textwrap.dedent(info)
  
                  if self.text is None or self.text not in self.ax.texts:
                      self.initText()
  
                  self.text.set_text(text)
                  self.text.xy = x, y
                  self.text.set_visible(True)
                  self.highlightCell(cell)
                  self.fig.canvas.draw()
              else:
                  self.hide()
  
          except BaseException as e:
              print(e)
function_tokens: def update ( self ) : try : if self . cellID > - 1 : cell = self . mesh . cell ( self . cellID ) center = cell . center ( ) x , y = center . x ( ) , center . y ( ) marker = cell . marker ( ) data = self . data [ self . cellID ] header = "Cell %d:\n" % self . cellID header += "-" * ( len ( header ) - 1 ) istr = "\nx: {:.2f}\n y: {:.2f}\n data: {:.2e}\n marker: {:d}" info = istr . format ( x , y , data , marker ) text = header + textwrap . dedent ( info ) if self . text is None or self . text not in self . ax . texts : self . initText ( ) self . text . set_text ( text ) self . text . xy = x , y self . text . set_visible ( True ) self . highlightCell ( cell ) self . fig . canvas . draw ( ) else : self . hide ( ) except BaseException as e : print ( e )