Alphabetical list Categories
textonpath Place text along a path
Call signature:

textonpath(xx, yy, text, dx=0, dy=0)

Help text:

textonpath(xx, yy, text) places the text along a path (xx, yy) defined in data coordinates.
Optional arguments dx and dy shift the text right by dx and down by dy pts in its local vertical direction.
textonpath does not use coordinates set by at, but it does respect alignment set by align.
In the present version, textonpath only accepts plain Unicode; not any of the special characters sequences accepted by text.

Example:

import qplot as qp

import numpy as np

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

xx = np.linspace(0,10,1000)

yy = np.cos(xx)

qp.pen(width=1)

qp.plot(xx, yy)

qp.ylim(-10, 10)

qp.font('Helvetica', 14)

qp.align('center', 'base')

qp.textonpath(xx, yy, 'This text follows the curve', dy=-3)

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