In [1]:
import sys
import matplotlib.pyplot as plt
sys.path.append('..')
from antlia.record import load_records
from antlia import util
%load_ext autoreload
%autoreload 2
In [2]:
def set_title(ax, title):
try:
mpld3
except NameError:
ax.figure.suptitle(title)
else:
ax.set_title(title)
In [3]:
DEFAULT_FIGSIZE = (14, 7)
In [4]:
records = load_records(sync=False)
In [5]:
plt.close()
for rid in range(4):
r = records[rid]
for tid, trial in enumerate(r.trial):
fig, ax = plt.subplots(figsize=DEFAULT_FIGSIZE)
ax.plot(trial.data.time, trial.data.speed)
set_title(ax, 'rider {}, trial {}, speed'.format(rid, tid))
plt.show()