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.2.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.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codeplots-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 152939e8121fa369369b745c1fa40adec38872ec9498ad90e1e563892c9934bd
MD5 7ee57bb9495e8d73a41ca7d0de10edcf
BLAKE2b-256 0f718765b7a388dd6a97062ac1c8bb672c74b5c33ac30d2f9cf5f57455a45e97

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codeplots-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 094abd6b5049685d9b12b64f2c319d6c3d8d59139d63d29cef77405135e94f19
MD5 a154887e413c48501f427a028e91cc30
BLAKE2b-256 f824d417290a6c580ea8a00661c8f43708c645795bb0156e921e5acdd497ac14

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page