Skip to main content

dyn_plot

Create matplotlib figures that can be easily updated at runtime in Jupyter.

import numpy as np
from dyn_plot import Plot

# accepts all plt.figure() arguments
plot = Plot(figsize=(10, 5))

ts = np.linspace(0, 10, 200)
losses = []
for t in ts:
  loss = -np.log(t + 0.001) + np.random.normal() * 0.4
  losses.append(loss)

  with plot: # clear and redraw
    # use any methods from Axes
    plot.set_title(f't = {t:.2f}')
    plot.plot(losses)

# close to avoid an additional rendering of the inner figure
plot.close() 

dyn plot video

Metadata

Release files for dyn-plot 0.1.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 dyn-plot 0.1.1
File Size Uploaded
dyn_plot-0.1.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dyn-plot 0.1.1
File Interpreter ABI Platform
dyn_plot-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / dyn_plot-0.1.1.tar.gz

Download URL dyn_plot-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1eb4c0fe230fd33377419fea4c0a1213a00fc607dd621383cf3a1b91abd28e26
BLAKE2b-256 checksum
How to use checksums
efb23d805ab0f359e1825a18b5e183bf4073ca26351a28d2ffa12769b3a94afb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Darwin/23.5.0

Release files / dyn_plot-0.1.1-py3-none-any.whl

Download URL dyn_plot-0.1.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
151d0d9491a06c7d0afcc0b94684a1792324a66c3cbfe088e5db6065250c8337
BLAKE2b-256 checksum
How to use checksums
76c3a57ba33780d75d919418a5dde486c17670b18cb30054acc0a28d71de1c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Darwin/23.5.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

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