parameters: (self, x_offset, y_offset)
docstring: Updates the position of a label (coordinates are relative, i.e. 0 <= pos <= 1)
docstring_summary: Updates the position of a label (coordinates are relative, i.e. 0 <= pos <= 1)
docstring_tokens: Updates the position of a label ( coordinates are relative i . e . 0 < = pos < = 1 )
function: def set_label_position(self, x_offset, y_offset):
          """
          Updates the position of a label (coordinates are relative, i.e. 0 <= pos <= 1)
          """
          self.remove_all_annotations()
          old_x = self.label_x_offset
          old_y = self.label_y_offset
          self.label_x_offset = x_offset
          self.label_y_offset = y_offset
          try:
              self.add_all_annotations()
          except RuntimeError as err:
              self.label_x_offset = old_x
              self.label_y_offset = old_y
              self.add_all_annotations()
              raise RuntimeError(str(err))
function_tokens: def set_label_position ( self , x_offset , y_offset ) : self . remove_all_annotations ( ) old_x = self . label_x_offset old_y = self . label_y_offset self . label_x_offset = x_offset self . label_y_offset = y_offset try : self . add_all_annotations ( ) except RuntimeError as err : self . label_x_offset = old_x self . label_y_offset = old_y self . add_all_annotations ( ) raise RuntimeError ( str ( err ) )