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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codeplots-0.3.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codeplots-0.3.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file codeplots-0.3.0.tar.gz.

File metadata

  • Download URL: codeplots-0.3.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for codeplots-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1d29e01ac63ce6dba5e3f2efb569d78d71c67c7f252bdf00e315e1cac711dd26
MD5 2595fa2665908763c6a7bb68691628be
BLAKE2b-256 cece28f4ca149eca67936f9c7523b1b696e03f2b4ed76c4467b0a5647132fc7b

See more details on using hashes here.

File details

Details for the file codeplots-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: codeplots-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for codeplots-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e0e61d0665cc1ac2031363e6ebb7fa6383beed8612ee9fe9af14f71728d93f9
MD5 3c7b3239fd1a2032254f6caa9be12701
BLAKE2b-256 5599336cf76eb834983340f1708aa1078048f479327773d759de26453d8cab4a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 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