Fold
A wide table made long: each row repeated once per chosen column, with that column's name and value.
Static preview; loading the interactive plot
import hmplot as hm
data = {"name": ["a", "b", "c"], "before": [1, 3, 2], "after": [2, 4, 1]}
with hm.Plot(data=data, height=300, axes2d=True) as plot:
with hm.Fold(fields=["before", "after"]):
hm.Points(x="key", y="value")
plot
Usage
Outputs key and value plus retained source columns and identities. as can rename key and value. Fold expands each observation once per requested field; it does not aggregate. Use a categorical X scale for the key channel.
To let the viewer change a setting, read an input in it: fields={input("fields")} (Python fields=hm.input.fields), where fields is a Select with multiple=true of column names.