darrow
Draw an arrowhead
Call signature:
darrow(x, y, phi=None, along=None, l=8, w=5, dist=0, dimple=0)
Help text:
darrow(x, y) draws an arrow head pointing to (x,y).
Optional arguments are:
phiArrow points in the given direction specified in radians in paper space (0: pointing right, pi/2: pointing down, etc)
alongArrow points in the given direction specified as a (DX,DY) vector in data space
lLength of the arrow in points (default: 8 pt)
wFull width of the arrow head in points (default: 5 pt)
distArrow is to be retracted a given distance from the point (x, y).
dimpleThe back of the arrow head is indented by dimple points.
Example:

import qplot as qp

import numpy as np

qp.figure('darrow', 3, 3)

tt = np.linspace(0, 4*np.pi, 100)

xx = np.sin(tt/2)

yy = np.sin(tt)

qp.pen('666')

qp.plot(xx, yy)

qp.brush('k')

qp.pen('k')

for n in range(5, len(xx), 10):

        qp.darrow(xx[n], yy[n], along=[xx[n]-xx[n-1], yy[n]-yy[n-1]])