Skip to content

Commit e597792

Browse files
committed
Correction
1 parent 7977d6d commit e597792

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

examples/16_network/pet_atlas.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ def start_axes(title):
2929
ax.set_title(title, weight="bold")
3030
return ax
3131

32+
3233
def update_axes(ax, mappable=None):
3334
ax.grid()
3435
ax.update_env()
3536
if mappable:
3637
return plt.colorbar(mappable, cax=ax.figure.add_axes([0.94, 0.05, 0.01, 0.9]))
3738

39+
3840
# %%
3941
# All
4042
# ---

examples/16_network/pet_ioannou_2017_case.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@
1919
# %%
2020
class VideoAnimation(FuncAnimation):
2121
def _repr_html_(self, *args, **kwargs):
22+
"""To get video in html and have a player"""
2223
return self.to_html5_video()
2324

2425
def save(self, *args, **kwargs):
2526
if args[0].endswith("gif"):
27+
# In this case gif is use to create thumbnail which are not use but consume same time than video
28+
# So we create an empty file, to save time
29+
with open(args[0], "w") as h:
30+
pass
2631
return
2732
return super().save(*args, **kwargs)
2833

@@ -114,7 +119,7 @@ def update_axes(ax, mappable=None):
114119
a.ax.set_xlim(19, 30), a.ax.set_ylim(32, 35.25)
115120
a.ax.update_env()
116121
a.txt.set_position((21.5, 32.7))
117-
kwargs = dict(frames=np.arange(*a.period), interval=100, blit=True)
122+
kwargs = dict(frames=np.arange(*a.period), interval=100)
118123
ani = VideoAnimation(a.fig, a.func_animation, **kwargs)
119124

120125
# %%

0 commit comments

Comments
 (0)