Skip to main content

codeplots

Tiny matplotlib shortcuts for plotting from VS Code, especially over SSH. It handles conversions such as .detach().cpu().numpy() for you and keeps a timestamped plot history when an interactive window is not practical.

import codeplots as cp

cp.plot([1, 3, 2, 5])          # auto line plot
cp.plot(image_array)           # auto image plot
cp.scatter(x, y)
cp.hist(values)
cp.bar({"a": 3, "b": 7})
cp.heatmap(matrix)

All helpers return a matplotlib Figure. Plots are saved automatically to .plots/ with timestamped names like 260428_193012_123456.svg, then opened in VS Code with code <file>.

fig = cp.plot(values)
cp.plot(values, save=False)      # skip autosave
cp.plot(values, prefix="loss")   # saves as .plots/loss_260428_193012_123456.svg

Pass filename="custom.svg" when you want an exact filename; it takes precedence over prefix. If it has no extension, .svg is added.

Shortcuts

plot, show, line, scatter, hist, bar, image, images, heatmap, box, violin, pie, loss, compare

Install

pip install codeplots

Release files for codeplots 0.3.0

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

Source distribution (sdist)

Source distribution for codeplots 0.3.0
File Size Uploaded
codeplots-0.3.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codeplots 0.3.0
File Interpreter ABI Platform
codeplots-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / codeplots-0.3.0.tar.gz

Download URL codeplots-0.3.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1d29e01ac63ce6dba5e3f2efb569d78d71c67c7f252bdf00e315e1cac711dd26
BLAKE2b-256 checksum
How to use checksums
cece28f4ca149eca67936f9c7523b1b696e03f2b4ed76c4467b0a5647132fc7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / codeplots-0.3.0-py3-none-any.whl

Download URL codeplots-0.3.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e0e61d0665cc1ac2031363e6ebb7fa6383beed8612ee9fe9af14f71728d93f9
BLAKE2b-256 checksum
How to use checksums
5599336cf76eb834983340f1708aa1078048f479327773d759de26453d8cab4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

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