Event Plot — Discrete Event Ticks per Row
Signature
sp.eventplot(title, x_values, categories, *, variant="basic", **kwargs) -> Chart
Aliases: sp.eventplot, sp.event_plot, sp.raster_plot, sp.spike_plot, sp.build_eventplot
Description
sp.eventplot() draws a short vertical tick for every discrete event, one row per category — the standard chart for point-in-time occurrences without duration (neuron spike trains, log/error timestamps, user session starts). Unlike gantt(), events have no end time. Reuses x_values and the existing categories field on ChartArgs (the same grouping mechanism used by bubble()'s categorical variant) — no new parameter shape, rows are formed automatically from distinct category values in order of first appearance.
Variants
Data
x_values (list[float]) — Event positions. categories (list[str]) — Row assignment per event.
Parameters
Themes
Returns
Chart — object with .html property and .show() method.
Tick marks only, one color per row.
Tick marks plus a smoothed density curve per row, computed with the same native kernel density estimator as [`kde()`](kde.md) (`scott_bw` bandwidth selection, Gaussian kernel) — a rug plot and a KDE in one chart.
Draws a thin line connecting each row's events in chronological order, on top of the usual ticks — traces the sequence/trajectory through time, not just where events landed.