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)
        
DEFAULT_FIGSIZE = (14, 7)

In [3]:
records = load_records(sync=False)


Unable to determine range 2
Unable to determine range 1

In [4]:
import itertools

plt.close()
for rid, tid in itertools.product(range(4), range(15)):
    record = records[rid]
    trial = record.trial[tid]
    
    try:
        ax = trial.plot_steer_event_detection(figsize=(DEFAULT_FIGSIZE))
        ax.set_title('rider {}, trial {}, events: {}'.format(rid, tid, ax.get_title()))
    except ValueError:
        pass
plt.show()


/Users/oliver/miniconda3/envs/dev/lib/python3.5/site-packages/matplotlib/pyplot.py:524: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
  max_open_warning, RuntimeWarning)