Plot arbitrary time-series data (non-calendar x-axis) into self-contained HTML using uPlot, with a pluggable parser system and expression-based derived traces.
- Loads one or more input files via auto-discovered parser plugins.
- Filters series by glob (
-F) or regex (-R) patterns. - Converts all data to base units and aligns traces to a common time grid.
- Renders sampled logic signals as stacked step lanes so signals do not overlap.
- Evaluates derived traces from expressions (
-e "name=expr"), including chained expressions. - Renders interactive offline HTML plots with summary statistics and input/source metadata.
- Supports dual y-axes (up to two distinct y-units per plot).
- Sorts all traces by RMS (descending) for readability.
- Opens the result in your browser automatically.
- Python
>=3.14 uv
Install as a user tool (recommended):
uv tool install git+https://github.com/smprather/time-plotThen run anywhere:
time-plot --helpRender a single input file:
time-plot -f path/to/data.csvRender file with derived expressions:
time-plot -f sine.csv -e "sum=sine+sine" -e "rate=ddt(sum)"Running with no -f flags opens the built-in sine.csv example.
time-plot [OPTIONS] -f <files...> [-F <glob>] [-R <regex>] [-e <name=expr>] ...
-f <path...>: Load one or more source files. Repeatable. Shell globs work (e.g.,-f *.csv).-F <glob>: Glob filter on series names; binds to the preceding-fgroup. No glob chars → substring match (foo→*foo*).-R <regex>: Regex filter on series names; same binding semantics as-F. ANDed with-Fif both given. Both orders work (-F g -R rand-R r -F g); repeated-F/-Rkeeps the last value; a filter before any-fis an error.-e "name=expr": Define a named expression (see Expressions).-i, --case-insensitive: Apply-F/-Rfilters case-insensitively.
-o, --output FILE: Output HTML path. Defaults to/tmp/$USER/time_plot.html.--open-browser / --no-open-browser: Open the output in the default browser after writing (default:--open-browser).-l, --list-series: List available series for each file (with-F/-Rapplied) and exit.--ascii: Print an ASCII plot to the terminal (viaplotext) and exit; no HTML is written.--ascii-width COLS: ASCII plot width in columns (default: terminal width).--ascii-height ROWS: ASCII plot height in rows (default: 30).--no-color: Disable ANSI colors in terminal output (auto-disabled when piped).--rms-filter THRESHOLD: Exclude series whose RMS is below the threshold (same units as the data).--show-rms-histogram: Print an ASCII histogram of per-series RMS values and exit.--add-plugins-dir DIRECTORY: Additional plugin directory (repeatable; last given has highest precedence).--list-plugins: List all discovered plugins with short descriptions and exit.--plugin-help PLUGIN: Show detailed help for a named plugin and exit.--parser-options TEXT: Comma-separatedkey=valuepairs passed to parser plugins.--version: Show the version and exit.
TIME_PLOT_EXTRA_PLUGINS_PATH: Colon-separated list of additional plugin directories.
time-plot -f signal.csv
time-plot -f signal.csv --ascii
time-plot -f logic.vcd
time-plot -f data.ptiavg -F 'rtr_0*' -l
time-plot -f data.ptiavg -F 'rtr_0*' -e "total=sum(*|rtr_0*)"
time-plot -f a.ptiavg -F 'mac*' -f b.ptiavg -F 'cts*' -e "diff=mac|inst-cts|inst"Note: Positional arguments (without -f) are not accepted and will produce an error.
- Default output path:
/tmp/$USER/time_plot.html. - Plot HTML is self-contained (inlines
uPlotJS/CSS assets) — works offline. - Interactive chart with mousewheel zoom and closest-series highlighting for non-logic plots.
- Summary statistics table (
Peak |y|,Average,RMS) for non-logic plots. - Logic traces use stacked lane rendering with vertical transitions at change timestamps; signal names appear as y-axis ticks, with no
Logicy-axis title, no cursor-nearest highlighting, and no numeric summary table. Logic legend rows toggle all rendered helper lines for the signal and show0/1/X/Zvalues. - Source table showing input file paths or expression text per trace.
- All traces sorted by RMS (descending).
--asciirenders analog traces as a static terminal plot instead of HTML (no interactivity). Logic traces are rejected in this mode; NaN gaps break the line. Up to two y-units are supported (second unit on the right axis).
- Plugin ID:
voltage-or-current-vs-time - File type:
.csv - Two-column header:
time(<unit>),voltage(<unit>)ortime(<unit>),current(<unit>)
time(ns),voltage(mv)
0,0
1,0.5- Plugin ID:
spice-pwl - Parses SPICE netlists containing
pwlvoltage or current sources. - Supports line continuations with leading
+. - Each PWL source becomes one series.
- Parser option
naming_method:element_name(default, uses the SPICE element name, e.g.vclk) orpositive_node_name(uses the positive terminal name, e.g.clk).
time-plot -f spice_pwl.spi --parser-options naming_method=positive_node_name- Plugin ID:
vcd - File type: