annotate
Guides & annotation
Minimal call
import math
xs = [i * 0.2 for i in range(40)]
df = {"x": xs, "y": [math.sin(x) for x in xs]}
c = pt.chart(df, aes(x="x", y="y"))
c.add_line()
c.add_annotate("peak", xy=(1.6, 1.0), xytext=(3.0, 1.2))
Docstring
Text-rendering artists — `text` for data-anchored labels, `annotate`
for a label connected to a point by an arrow.
c.add_text(aes(x="x", y="y", label="name")) # columns via aes
c.add_annotate("peak", xy=(3, 14.7)) # one-off label
Both render glyph paths from the bundled DejaVu Sans so output stays
font-independent.