Skip to main content

pycan-plot

Graph CAN signals from a recorded candump log, decoded through a KCD database.

Installation

pip install -e .

Usage

pycan-plot capture.log -d database.kcd -s Status.Voltage -s Status.Mode -o plot.png

Signals are named Message.Signal, exactly as they appear in the KCD. With no -o, an interactive window opens instead.

Option Meaning
-d, --kcd KCD database (required)
-s, --signal Message.Signal to plot; repeatable
-p, --prefix Hex stack-position prefix ORed onto each message ID (default 0x0)
-t, --time-window START..END; each end is relative seconds (12.5) or a clock time (08:25:40), and either may be omitted
-o, --output Output file; format taken from the extension (.png, .svg, .pdf)
--show Open an interactive window; implied when -o is absent
--split One subplot per signal instead of overlaying them
--line Interpolate between samples instead of holding each value

Signals are drawn as steps by default, because a CAN signal holds its last received value until the next frame arrives. --line overrides that.

Examples:

# One module in stack position 2, clipped to twenty seconds of the capture
pycan-plot capture.log -d db.kcd -s Status.Voltage -p 0x02000000 -t 10..30 -o v.png

# Two signals on separate stacked axes, clipped by wall-clock time
pycan-plot capture.log -d db.kcd -s Status.Voltage -s Status.Mode \
    --split -t 08:25:40..08:26:10 -o both.svg

Exit codes

Code Meaning
0 success
1 log, KCD, or output file could not be read or written
2 CLI usage error (unknown message or signal, bad -t, bad -p)
3 no samples found for any requested signal

Exit code 3 reports which stack-position prefixes were present for the requested messages — usually the fastest way to spot a wrong -p.

Fish tab completion

An editable install writes the completion script automatically. To do it by hand:

_PYCAN_PLOT_COMPLETE=fish_source pycan-plot | source                                      # current shell
_PYCAN_PLOT_COMPLETE=fish_source pycan-plot > ~/.config/fish/completions/pycan-plot.fish  # persistent

Completion covers log files, KCD files, message and signal names pulled live from the KCD on the command line, and — once the log file is given — the stack-position prefixes actually present in that log.

License

pycan-plot is distributed under the terms of the GPL-3.0-or-later license.

Metadata

Release files for pycan-plot 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycan-plot 0.0.1
File Size Uploaded Provenance Actions
pycan_plot-0.0.1.tar.gz 17.6 kB Without provenance Details for pycan_plot-0.0.1.tar.gz

Release files / pycan_plot-0.0.1.tar.gz

Download URL pycan_plot-0.0.1.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4f46cbce03ca637a670d183813176c6e44896d45b51173b3ebced43a64e95b19
BLAKE2b-256 checksum
How to use checksums
d825af40762fb592d15540259fbecf69eb7613fa9ae3ac6ea58274e5b386f3bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for pycan-plot 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page