class_docstr: Infinite horizontal or vertical line for 2D plots.
  
  Parameters
  ----------
  pos : float
      Position of the line along the axis.
  color : list, tuple, or array
      The color to use when drawing the line. If an array is given, it
      must be of shape (1, 4) and provide one rgba color per vertex.
  line_width: float
      The width of the Infinite line, in pixels
  antialias: bool
      If the line is drawn with antialiasing
  vertical:
      True for drawing a vertical line, False for an horizontal line
class_docstr_tok: ["Infinite","horizontal","or","vertical","line","for","2D","plots",".","Parameters","--","--","--","--","--","pos",":","float","Position","of","the","line","along","the","axis",".","color",":","list",",","tuple",",","or","array","The","color","to","use","when","drawing","the","line",".","If","an","array","is","given",",","it","must","be","of","shape","(","1",",","4",")","and","provide","one","rgba","color","per","vertex",".","line_width",":","float","The","width","of","the","Infinite","line",",","in","pixels","antialias",":","bool","If","the","line","is","drawn","with","antialiasing","vertical",":","True","for","drawing","a","vertical","line",",","False","for","an","horizontal","line"]
docstr_tok: []
code: def __init__(
      self,
      pos=None,
      color=(1.0, 1.0, 1.0, 1.0),
      line_width=1.0,
      antialias=False,
      vertical=True,
      **kwargs,
  ):
      """ """
      Visual.__init__(
          self,
          vcode=self._shaders["vertex"],
          fcode=self._shaders["fragment"],
      )
  
      self._changed = {"pos": False, "color": False}
  
      self.pos_buf = gloo.VertexBuffer()
      # The Visual superclass contains a MultiProgram, which is an object
      # that behaves like a normal shader program (you can assign shader
      # code, upload values, set template variables, etc.) but internally
      # manages multiple ModularProgram instances, one per view.
  
      # The MultiProgram is accessed via the `shared_program` property, so
      # the following modifications to the program will be applied to all
      # views:
      self.shared_program["a_pos"] = self.pos_buf
      self._program.vert["is_vertical"] = 1 if vertical else 0
  
      self._need_upload = False
      self._is_vertical = bool(vertical)
      self._pos = np.zeros((2, 2), dtype=np.float32)
      self._color = np.ones(4, dtype=np.float32)
      self._line_width = line_width
      self._antialias = antialias
  
      # Visual keeps track of draw mode, index buffer, and GL state. These
      # are shared between all views.
      self._draw_mode = "line_strip"
      self.set_gl_state("translucent", depth_test=False)
  
      self.set_data(pos=pos, color=color)
  
file_path: vispy/vispy/visuals/infinite_line.py
imports: import numpy
  from ..None import gloo
  from .visual import Visual
label_desc: Use image node_id 1 to create a new InfiniteLineVisual object from inherited base classes: Visual with example: obj = InfiniteLineVisual(pos, color, line_width, antialias, vertical)