plotlet v0.6.2

step

Pairwise data

Minimal call

df = {"x": list(range(8)), "y": [1, 3, 2, 5, 4, 3, 6, 5]}

c = pt.chart(df, aes(x="x", y="y"), xlabel="x", ylabel="y")
c.add_step(where="post")

Docstring

Line / step — connected xy points, single-series per record.

  c.add_line(aes(x="col_x", y="col_y"))                 # columns via aes
  c.add_line(aes(x="col_x", y="col_y", color="g"))      # one line per color level
  c.add_line(aes(x="col_x", y="col_y",                  # invisible split — one
          color="cohort", group="subject"))             #   line per subject,
                                                        #   colors only by cohort
  c.add_line(aes(...), linestyle="--")                  # literal dash
  c.add_line(aes(..., linestyle="cohort"))              # dash cycle per level
  c.add_line(aes(..., alpha="cohort"), alphas=(.3, 1))  # opacity per level
  c.add_line(aes(...), arc=False)                       # straight chords under
                                                        #   CircularCoordinate
                                                        #   (no-op in Cartesian)
  c.add_step(aes(x="col_x", y="col_y"), where="post")   # step variant; where=
                                                        #   "pre" | "post" | "mid"
  c.add_line(aes(x="dose", y="resp"),                   # aggregate replicate
          estimator="mean")                             #   rows per x with a
                                                        #   CI band (seaborn
                                                        #   lineplot)

Aggregation (estimator=): replicate rows sharing an x collapse to their
mean/median, drawn with a shaded CI band. `ci="t"` (default) is the
analytic t interval on the mean; `ci="boot"` a percentile bootstrap
(any estimator); `ci=None` just the aggregated line. `level=0.95`,
`n_boot=1000`, `seed=0`, `band_alpha=0.2` tune it. Applies per series
after color=/group= splitting; needs curve='linear'.

`linestyle="--"` (bare) is always a literal dash (`"--"`, `":"`,
`"6,3,1,3"`). `aes(linestyle="col")` maps the column: dash patterns
cycle per level.

Dense lines (simplify=): a long series is one `<path>`, so the cost is
the d-string size, not the node count. Above `dense_threshold`
vertices (or with `simplify=True`; `False` never) the affine path drops
the vertices the stroke can't show at pixel resolution — same drawn
pixels, far smaller output (see `draw/_simplify.py`). Auto mode skips
dashed lines, whose dash phase follows arc length.

Column-driven splitting (any of `color`/`group`/`linestyle`/`alpha` in aes) is
handled at the Chart layer — the artist itself always sees one series
per record.