plotlet v0.6.2

fill_between

Pairwise data

Minimal call

import math
xs = [i * 0.2 for i in range(40)]
mid = [math.sin(x) for x in xs]
df = {"x": xs, "mid": mid, "lo": [m - 0.3 for m in mid],
      "hi": [m + 0.3 for m in mid]}

c = pt.chart(df, aes(x="x"), xlabel="x", ylabel="y")
c.add_fill_between(aes(y1="lo", y2="hi"), alpha=0.3)
c.add_line(aes(y="mid"))

Docstring

Filled-region artists over x/y series.

`fill_between` fills between two curves (`y1` and `y2` columns over a
shared `x`). `area` stacks rows over `x`, optionally grouped by
`aes(fill=...)`.

  c.add_fill_between(aes(x="x", y1="lo", y2="hi"), fill="C0")  # band
  c.add_area(aes(x="x", y="y"))                                # single
  c.add_area(aes(x="x", y="y", fill="series"))                 # stacked