SubplotAnimation¶
[1]:
from smpl_animation import animation
from smpl import plot
import matplotlib.pyplot as plt
import numpy as np
import tqdm
Tight¶
[2]:
%matplotlib notebook
plt.ioff()
for a in tqdm.tqdm(np.linspace(0,10,200)):
fig, axs = plot.subplots(1, 3, figsize=(12, 8), sharey=True)
fig.subplots_adjust(wspace=0)
plot.function(lambda x: a*x**2,axes=axs[0],tight=False,xmin=0,xmax=1)
plot.function(lambda x: a*x**5,axes=axs[0],tight=False,xmin=0,xmax=1)
plot.function(lambda x: a*x**3,axes=axs[1],logx=True,tight=False,xmin=0,xmax=1)
plot.function(lambda x: a*x**1,axes=axs[2],tight=False,xmin=0,xmax=1)
animation.frame()
#ani.save("test.gif")
ani = animation.animate(interval=10,blit=True)
plt.show()
100%|██████████| 200/200 [00:18<00:00, 11.09it/s]
Normal¶
[3]:
%matplotlib notebook
plt.ioff()
animation.clear()
for a in tqdm.tqdm(np.linspace(0,10,200)):
fig, axs = plot.subplots(1, 3, figsize=(12, 8), sharey=True)
fig.subplots_adjust(wspace=0)
plot.function(lambda x: a*x**2,axes=axs[0],xmin=0,xmax=1)
plot.function(lambda x: a*x**5,axes=axs[0],xmin=0,xmax=1)
plot.function(lambda x: a*x**3,axes=axs[1],logx=True,xmin=0,xmax=1)
plot.function(lambda x: a*x**1,axes=axs[2],xmin=0,xmax=1)
animation.frame()
#ani.save("test.gif")
ani = animation.animate(interval=10,blit=True)
plt.show()
100%|██████████| 200/200 [02:08<00:00, 1.55it/s]
[ ]:
[ ]:
[ ]: