class_docstr: Visual displaying windbarbs.
docstr: Set the data used to display this visual.
  
  Parameters
  ----------
  pos : array
      The array of locations to display each windbarb.
  wind : array
      The array of wind vector components to display each windbarb.
      in m/s. For knots divide by two.
  trig : bool
      True - wind contains (mag, ang)
      False - wind contains (u, v)
      defaults to True
  size : float or array
      The windbarb size in px.
  antialias : float
      The antialiased area (in pixels).
  edge_width : float | None
      The width of the windbarb outline in pixels.
  edge_color : Color | ColorArray
      The color used to draw each symbol outline.
  face_color : Color | ColorArray
      The color used to draw each symbol interior.
code: def set_data(
      self,
      pos=None,
      wind=None,
      trig=True,
      size=50.0,
      antialias=1.0,
      edge_width=1.0,
      edge_color="black",
      face_color="white",
  ):
      """Set the data used to display this visual.
  
      Parameters
      ----------
      pos : array
          The array of locations to display each windbarb.
      wind : array
          The array of wind vector components to display each windbarb.
          in m/s. For knots divide by two.
      trig : bool
          True - wind contains (mag, ang)
          False - wind contains (u, v)
          defaults to True
      size : float or array
          The windbarb size in px.
      antialias : float
          The antialiased area (in pixels).
      edge_width : float | None
          The width of the windbarb outline in pixels.
      edge_color : Color | ColorArray
          The color used to draw each symbol outline.
      face_color : Color | ColorArray
          The color used to draw each symbol interior.
      """
      assert (
          isinstance(pos, np.ndarray)
          and pos.ndim == 2
          and pos.shape[1] in (2, 3)
      )
      assert (
          isinstance(wind, np.ndarray)
          and pos.ndim == 2
          and pos.shape[1] == 2
      )
      if edge_width < 0:
          raise ValueError("edge_width cannot be negative")
  
      # since the windbarb starts in the fragment center,
      # we need to multiply by 2 for correct length
      size *= 2
  
      edge_color = ColorArray(edge_color).rgba
      if len(edge_color) == 1:
          edge_color = edge_color[0]
  
      face_color = ColorArray(face_color).rgba
      if len(face_color) == 1:
          face_color = face_color[0]
  
      n = len(pos)
      data = np.zeros(
          n,
          dtype=[
              ("a_position", np.float32, 3),
              ("a_wind", np.float32, 2),
              ("a_trig", np.float32, 0),
              ("a_fg_color", np.float32, 4),
              ("a_bg_color", np.float32, 4),
              ("a_size", np.float32),
              ("a_edgewidth", np.float32),
          ],
      )
      data["a_fg_color"] = edge_color
      data["a_bg_color"] = face_color
      data["a_edgewidth"] = edge_width
      data["a_position"][:, : pos.shape[1]] = pos
      data["a_wind"][:, : wind.shape[1]] = wind
      if trig:
          data["a_trig"] = 1.0
      else:
          data["a_trig"] = 0.0
      data["a_size"] = size
      self.shared_program["u_antialias"] = antialias
      self._data = data
      self._vbo.set_data(data)
      self.shared_program.bind(self._vbo)
      self.update()
  
file_path: vispy/vispy/visuals/windbarb.py
imports: import numpy
  from vispy.color import ColorArray
  from vispy.gloo import VertexBuffer
  from vispy.visuals.shaders import Variable
  from vispy.visuals.visual import Visual
label_desc: Use image node_id 2 for calling the WindbarbVisual obj's underlying member method code with example usage: obj.set_data(pos, wind, trig, size, antialias, edge_width, edge_color, face_color) without return types