class_docstr: A TextItem that attaches itself to an InfiniteLine.
  
  This class extends TextItem with the following features:
  
    * Automatically positions adjacent to the line at a fixed position along
      the line and within the view box.
    * Automatically reformats text when the line value has changed.
    * Can optionally be dragged to change its location along the line.
    * Optionally aligns to its parent line.
  
  =============== ==================================================================
  **Arguments:**
  line            The InfiniteLine to which this label will be attached.
  text            String to display in the label. May contain a {value} formatting
                  string to display the current value of the line.
  movable         Bool; if True, then the label can be dragged along the line.
  position        Relative position (0.0-1.0) within the view to position the label
                  along the line.
  anchors         List of (x,y) pairs giving the text anchor positions that should
                  be used when the line is moved to one side of the view or the
                  other. This allows text to switch to the opposite side of the line
                  as it approaches the edge of the view. These are automatically
                  selected for some common cases, but may be specified if the 
                  default values give unexpected results.
  =============== ==================================================================
  
  All extra keyword arguments are passed to TextItem. A particularly useful
  option here is to use `rotateAxis=(1, 0)`, which will cause the text to
  be automatically rotated parallel to the line.
docstr: Set the relative position (0.0-1.0) of this label within the view box
  and along the line. 
  
  For horizontal (angle=0) and vertical (angle=90) lines, a value of 0.0
  places the text at the bottom or left of the view, respectively. 
docstr_tok: ["Set","the","relative","position","(","0.0-1.0",")","of","this","label","within","the","view","box","and","along","the","line",".","For","horizontal","(","angle=0",")","and","vertical","(","angle=90",")","lines",",","a","value","of","0.0","places","the","text","at","the","bottom","or","left","of","the","view",",","respectively","."]
code: def setPosition(self, p):
      """Set the relative position (0.0-1.0) of this label within the view box
      and along the line.
  
      For horizontal (angle=0) and vertical (angle=90) lines, a value of 0.0
      places the text at the bottom or left of the view, respectively.
      """
      self.orthoPos = p
      self.updatePosition()
  
imports: from math import atan2, degrees
  import numpy
  from ..None import functions
  from ..Point import Point
  from ..Qt import QtCore, QtGui
  from .GraphicsItem import GraphicsItem
  from .GraphicsObject import GraphicsObject
  from .TextItem import TextItem
  from .ViewBox import ViewBox
label_desc: Use image node_id 7 for calling the InfLineLabel obj's underlying member method code with example usage: obj.setPosition(p) without return types