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()
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dyn_plot-0.1.1.tar.gz
(5.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dyn_plot-0.1.1.tar.gz.
File metadata
- Download URL: dyn_plot-0.1.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.7 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb4c0fe230fd33377419fea4c0a1213a00fc607dd621383cf3a1b91abd28e26
|
|
| MD5 |
d14a692dea9adfcf5116395d25e139d5
|
|
| BLAKE2b-256 |
efb23d805ab0f359e1825a18b5e183bf4073ca26351a28d2ffa12769b3a94afb
|
File details
Details for the file dyn_plot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dyn_plot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.7 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
151d0d9491a06c7d0afcc0b94684a1792324a66c3cbfe088e5db6065250c8337
|
|
| MD5 |
0b1889e9bd3a2d613085a1ed191339cb
|
|
| BLAKE2b-256 |
76c3a57ba33780d75d919418a5dde486c17670b18cb30054acc0a28d71de1c46
|