Alphabetical list Categories
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:
  phi - Arrow points in the given direction specified in radians    in paper space (0: pointing right, pi/2: pointing down, etc)
  along - Arrow points in the given direction specified as a (dx,dy)    vector in data space
  l - Length of the arrow in points (default: 8 pt)
  w - Full width of the arrow head in points (default: 5 pt)
  dist - Arrow is to be retracted a given distance from the point (x, y).
  dimple - The 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]])

QPlot Documentation — (C) Daniel Wagenaar, 2014–2023