You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a simple Jupyter notebook based on the parametric example, playback freezes when using matplotlib-3.3.2, using the latest release animatplot-0.4.1.
Notebook contained (sorry, Github won't let me attach a .ipynb):
%matplotlib notebook
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import PillowWriter
import animatplot as amp
def psi(t):
x = t
y = np.sin(t)
return x, y
t = np.linspace(0, 2*np.pi, 25)
x, y = psi(t)
X, Y = amp.util.parametric_line(x, y)
timeline = amp.Timeline(t, 's', 24)
ax = plt.axes(xlim=[0, 7], ylim=[-1.1, 1.1])
block1 = amp.blocks.Line(X, Y, ax=ax)
# or equivalently
# block1 = amp.blocks.ParametricLine(x, y, ax=ax)
anim = amp.Animation([block1], timeline)
# Your standard matplotlib stuff
plt.title('Parametric Line')
plt.xlabel('x')
plt.ylabel(r'y')
# Create Interactive Elements
anim.toggle()
anim.timeline_slider()
and freezes with the error
[IPKernelApp] WARNING | Unknown error in handling startup files:
ERROR:tornado.application:Exception in callback <bound method TimerBase._on_timer of <matplotlib.backends.backend_webagg_core.TimerTornado object at 0x7fd353719b50>>
Traceback (most recent call last):
File ".../python3.7/site-packages/tornado/ioloop.py", line 907, in _run
return self.callback()
File ".../python3.7/site-packages/matplotlib/backend_bases.py", line 1194, in _on_timer
ret = func(*args, **kwargs)
File ".../python3.7/site-packages/matplotlib/animation.py", line 1432, in _step
self.event_source.interval = self._repeat_delay
File ".../python3.7/site-packages/matplotlib/backend_bases.py", line 1135, in interval
self._timer_set_interval()
File ".../python3.7/site-packages/matplotlib/backends/backend_webagg_core.py", line 537, in _timer_set_interval
self._timer_start()
File ".../python3.7/site-packages/matplotlib/backends/backend_webagg_core.py", line 520, in _timer_start
self.interval)
File ".../python3.7/site-packages/tornado/ioloop.py", line 873, in __init__
raise ValueError("Periodic callback must have a positive callback_time")
ValueError: Periodic callback must have a positive callback_time
Animation worked as expected with matplotlib-3.2.2.
conda won't let me update just matplotlib from 3.2 to 3.3. Don't understand why, but it complained about package conflicts. So a few apparently unrelated packages had different versions in the environments I tested with. Output of conda env export below.
For matplotlib-3.2:
In a simple Jupyter notebook based on the parametric example, playback freezes when using
matplotlib-3.3.2
, using the latest releaseanimatplot-0.4.1
.Notebook contained (sorry, Github won't let me attach a .ipynb):
and freezes with the error
Animation worked as expected with
matplotlib-3.2.2
.conda
won't let me update just matplotlib from 3.2 to 3.3. Don't understand why, but it complained about package conflicts. So a few apparently unrelated packages had different versions in the environments I tested with. Output ofconda env export
below.For matplotlib-3.2:
and for matplotlib-3.3:
The text was updated successfully, but these errors were encountered: