parameters: (ax, mesh, c, data, dataMesh=None, linewidth=1.0,
                      dropTol=0.0, **kwargs)
return_statement: return lines
docstring: Draw a single streamline.
  
      Draw a single streamline into a given mesh for given data stating at
      the center of cell c.
      The Streamline will be enlarged until she reached a cell that
      already contains a streamline.
  
      TODO
          linewidth and color depends on absolute velocity
          or background color saturation
  
      Parameters
      ----------
      ax : matplotlib.ax
          ax to draw into
      mesh : :gimliapi:`GIMLI::Mesh`
          2d mesh
      c : :gimliapi:`GIMLI::Cell`
          Start point is c.center()
      data : iterable float | [float, float]
          If data is an array (per cell or node) gradients are calculated
          otherwise the data will be interpreted as vector field per nodes or
          cell centers.
      dataMesh : :gimliapi:`GIMLI::Mesh` [None]
          Optional mesh for the data. If you want high resolution
          data to plot on coarse draw mesh.
      linewidth : float [1.0]
          Streamline linewidth
      dropTol : float [0.0]
          Don't draw stream lines with velocity lower than drop tolerance.
  
      Keyword Arguments
      -----------------
      **kwargs
          arrowSize: int
              Size of the arrow's head.
          arrowColor: str
              Color of the arrow's head.
          Additional kwargs are being forwarded to mpl.LineCollection, mpl.Polygon
docstring_summary: Draw a single streamline.
docstring_tokens: Draw a single streamline .
function: def drawStreamLine_(ax, mesh, c, data, dataMesh=None, linewidth=1.0,
                      dropTol=0.0, **kwargs):
      """Draw a single streamline.
  
      Draw a single streamline into a given mesh for given data stating at
      the center of cell c.
      The Streamline will be enlarged until she reached a cell that
      already contains a streamline.
  
      TODO
          linewidth and color depends on absolute velocity
          or background color saturation
  
      Parameters
      ----------
      ax : matplotlib.ax
          ax to draw into
      mesh : :gimliapi:`GIMLI::Mesh`
          2d mesh
      c : :gimliapi:`GIMLI::Cell`
          Start point is c.center()
      data : iterable float | [float, float]
          If data is an array (per cell or node) gradients are calculated
          otherwise the data will be interpreted as vector field per nodes or
          cell centers.
      dataMesh : :gimliapi:`GIMLI::Mesh` [None]
          Optional mesh for the data. If you want high resolution
          data to plot on coarse draw mesh.
      linewidth : float [1.0]
          Streamline linewidth
      dropTol : float [0.0]
          Don't draw stream lines with velocity lower than drop tolerance.
  
      Keyword Arguments
      -----------------
      **kwargs
          arrowSize: int
              Size of the arrow's head.
          arrowColor: str
              Color of the arrow's head.
          Additional kwargs are being forwarded to mpl.LineCollection, mpl.Polygon
      """
      x, y, v = streamline(mesh, data, startCoord=c.center(), dLengthSteps=5,
                           dataMesh=dataMesh, maxSteps=10000, verbose=False,
                           coords=[0, 1])
  
      if 'color' not in kwargs:
          kwargs['color'] = 'black'
  
      arrowSize = kwargs.pop('arrowSize', 12)
      arrowColor = kwargs.pop('arrowColor', kwargs.get('color'))
  
      lines = None
  
      if len(x) > 2:
          points = np.array([x, y]).T.reshape(-1, 1, 2)
  
          segments = np.concatenate([points[:-1], points[1:]], axis=1)
  
          lwidths = pg.Vector(len(v), kwargs.pop('lw', linewidth))
          lwidths[pg.find(pg.Vector(v) < dropTol)] = 0.0
  
          lines = mpl.collections.LineCollection(segments,
                                                 linewidths=lwidths, **kwargs)
          ax.add_collection(lines)
  
          # probably the limits are wrong without plot call
          # lines = ax.plot(x, y, **kwargs)
          # updateAxes_(ax, lines)
          # ax.plot(x, y, '.-', color='black', **kwargs)
      if len(x) > 3:
          xmid = int(len(x) / 2)
          ymid = int(len(y) / 2)
          dx = x[xmid + 1] - x[xmid]
          dy = y[ymid + 1] - y[ymid]
          c = mesh.findCell([x[xmid], y[ymid]])
  
          if v[xmid] > dropTol:
  
              absArrowSize = True
              if absArrowSize:
                  ax.annotate('',
                      xytext=(x[xmid]-dx, y[ymid]-dy),
                      xy=(x[xmid], y[ymid]),
                      arrowprops=dict(arrowstyle="-|>", color=arrowColor, lw=0),
                      size=arrowSize, **kwargs,
                  )
              else:
                  ax.arrow(x[xmid], y[ymid], dx, dy,
                          shape='full', lw=0,
                          length_includes_head=True,
                          fc=arrowColor,
                          head_width=.35, **kwargs)
  
              # dx90 = -dy
              # dy90 = dx
              # aLen = 3
              # aWid = 1
              # xy = list(zip([x[xmid] + dx90*aWid, x[xmid] + dx*aLen,
              #                x[xmid] - dx90*aWid],
              #               [y[ymid] + dy90*aWid, y[ymid] + dy*aLen,
              #                y[ymid] - dy90*aWid]))
  
              # arrow = mpl.patches.Polygon(xy, ls=None, lw=0, closed=True,
              #                             **kwargs)
              #ax.add_patch(arrow)
  
      return lines
function_tokens: def drawStreamLine_ ( ax , mesh , c , data , dataMesh = None , linewidth = 1.0 , dropTol = 0.0 , * * kwargs ) : x , y , v = streamline ( mesh , data , startCoord = c . center ( ) , dLengthSteps = 5 , dataMesh = dataMesh , maxSteps = 10000 , verbose = False , coords = [ 0 , 1 ] ) if 'color' not in kwargs : kwargs [ 'color' ] = 'black' arrowSize = kwargs . pop ( 'arrowSize' , 12 ) arrowColor = kwargs . pop ( 'arrowColor' , kwargs . get ( 'color' ) ) lines = None if len ( x ) > 2 : points = np . array ( [ x , y ] ) . T . reshape ( - 1 , 1 , 2 ) segments = np . concatenate ( [ points [ : - 1 ] , points [ 1 : ] ] , axis = 1 ) lwidths = pg . Vector ( len ( v ) , kwargs . pop ( 'lw' , linewidth ) ) lwidths [ pg . find ( pg . Vector ( v ) < dropTol ) ] = 0.0 lines = mpl . collections . LineCollection ( segments , linewidths = lwidths , * * kwargs ) ax . add_collection ( lines ) # probably the limits are wrong without plot call # lines = ax.plot(x, y, **kwargs) # updateAxes_(ax, lines) # ax.plot(x, y, '.-', color='black', **kwargs) if len ( x ) > 3 : xmid = int ( len ( x ) / 2 ) ymid = int ( len ( y ) / 2 ) dx = x [ xmid + 1 ] - x [ xmid ] dy = y [ ymid + 1 ] - y [ ymid ] c = mesh . findCell ( [ x [ xmid ] , y [ ymid ] ] ) if v [ xmid ] > dropTol : absArrowSize = True if absArrowSize : ax . annotate ( '' , xytext = ( x [ xmid ] - dx , y [ ymid ] - dy ) , xy = ( x [ xmid ] , y [ ymid ] ) , arrowprops = dict ( arrowstyle = "-|>" , color = arrowColor , lw = 0 ) , size = arrowSize , * * kwargs , ) else : ax . arrow ( x [ xmid ] , y [ ymid ] , dx , dy , shape = 'full' , lw = 0 , length_includes_head = True , fc = arrowColor , head_width = .35 , * * kwargs ) # dx90 = -dy # dy90 = dx # aLen = 3 # aWid = 1 # xy = list(zip([x[xmid] + dx90*aWid, x[xmid] + dx*aLen, #                x[xmid] - dx90*aWid], #               [y[ymid] + dy90*aWid, y[ymid] + dy*aLen, #                y[ymid] - dy90*aWid])) # arrow = mpl.patches.Polygon(xy, ls=None, lw=0, closed=True, #                             **kwargs) #ax.add_patch(arrow) return lines