axvline
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_axvline(math.pi, color="#C44E52", linestyle=":")
Docstring
Reference-line / span artists — decorate the frame.
`axhline` / `axvline` / `axhspan` / `axvspan` ignore autoscaling and span
the full frame regardless of the data scale. `axline` is the arbitrary-
direction sibling (matplotlib `axline` / ggplot `geom_abline`):
c.add_axline((0, 0), (1, 1)) # infinite line through two points
c.add_axline((0, 0), slope=1) # point + slope (linear scales only)
`hlines` / `vlines` are the bounded, data-coordinate counterparts that
participate in autoscaling and use the color cycle so a labeled call acts
like a series.