darrow
Draw an arrowhead
Call signature:
darrow(x, y, phi=None, along=None, l=None, w=None, 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 millimeters or points (default: 2.8 mm (8 pt))
wFull width of the arrow head in millimeters or points (default: 1.8 mm (5 pt))
distArrow is to be retracted a given distance (mm or pt) from the point (x, y).
dimpleThe back of the arrow head is indented by the given distance (mm or pt).
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]])