Dynplot
Extends matplotlib's pyplot.plot() to allow for repetitive plotting to the same figure
Install / Use
/learn @lorenzschmid/DynplotREADME
dynplot
Extends matplotlib's pyplot.plot() to allow for repetitive plotting to the same figure
There is no simple way to update multiple lines repetitively and continuously of an existing figure in matplotlib <https://matplotlib.org/>_. Using this class as drop-in replacement for matplotlib's pyplot, the figure's line will be updated upon every call of the plot() method and create thus a dynamic plot, constantly refreshing.
Current limitations:
-
Only the
plotfunction is supported. -
The figure and axes are only configurable via the internal
figandaxattribute, i.e. the following call will fail:dplt.title('Will fail!')
In this case, instead use the following:
_ = dplt.ax.set_title('Will work!')
Examples:
Single call during one repetition, could also contain multiple x/y data pairs.
from dynplot import dynplot from math import sin, pi
dplt = dynplot() for i in range(100): x = range(i, i+20) y = [sin(2pix/20) for x in x] dplt.plot(x, y) _ = dplt.ax.set_title('Wave') dplt.show()
Multiple calls (i.e. multiple lines) during one repetition
from dynplot import dynplot from math import sin, pi
dplt = dynplot() for i in range(100): x = range(i, i+20) y1 = [sin(2pix/20) for x in x] y2 = [sin(2pix/10) for x in x] dplt.plot(y1) dplt.plot(y2) dplt.show()
Installation
The module is build in a way to be installable with pip <https://pypi.org/project/pip/>_:
- Clone this repository and enter it
- Type
pip install .to install it
In order to add it to a requirements file as normally obtained from pip freeze, use the following line:
-e git+https://github.com/lorenzschmid/dynplot.git#egg=dynplot==1.0.0
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
85.3kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
342.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
