class_docstr: Infinite horizontal or vertical region for 2D plots.
  
  Parameters
  ----------
  pos : list, tuple or numpy array
      Bounds of the region along the axis. len(pos) must be >=2.
  color : list, tuple, or array
      The color to use when drawing the line. It must have a shape of
      (1, 4) for a single color region or (len(pos), 4) for a multicolor
      region.
  vertical:
      True for drawing a vertical region, False for an horizontal region
class_docstr_tok: ["Infinite","horizontal","or","vertical","region","for","2D","plots",".","Parameters","--","--","--","--","--","pos",":","list",",","tuple","or","numpy","array","Bounds","of","the","region","along","the","axis",".","len","(","pos",")","must","be",">","=2",".","color",":","list",",","tuple",",","or","array","The","color","to","use","when","drawing","the","line",".","It","must","have","a","shape","of","(","1",",","4",")","for","a","single","color","region","or","(","len","(","pos",")",",","4",")","for","a","multicolor","region",".","vertical",":","True","for","drawing","a","vertical","region",",","False","for","an","horizontal","region"]
docstr: This method is called immediately before each draw.
  
  The *view* argument indicates which view is about to be drawn.
docstr_tok: ["This","method","is","called","immediately","before","each","draw",".","The","*","view","*","argument","indicates","which","view","is","about","to","be","drawn","."]
code: def _prepare_draw(self, view=None):
      """This method is called immediately before each draw.
  
      The *view* argument indicates which view is about to be drawn.
      """
      if self._changed["pos"]:
          self.pos_buf.set_data(self._pos)
          self._changed["pos"] = False
  
      if self._changed["color"]:
          self.color_buf.set_data(self._color)
          self._program.vert["color"] = self.color_buf
          self._changed["color"] = False
  
      return True
  
file_path: vispy/vispy/visuals/linear_region.py
imports: import numpy
  from ..None import gloo
  from .visual import Visual
label_desc: Use image node_id 8 for calling the LinearRegionVisual obj's underlying member method code with example usage: obj._prepare_draw(view) and returns: True