Table of Contents


In [8]:
from __future__ import division
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('whitegrid')
%matplotlib inline

In [9]:
df = pd.read_csv('mio_hr_all_activities.csv')

In [10]:
f,ax = plt.subplots()
sns.tsplot(data=df, time='time', unit='trial', condition='activity', value='heart_rate', color="Set2", ax=ax)
ax.set_xlabel('Time [s]')
ax.set_ylabel('Heart rate [bpm]')
ax.legend(loc='center left', bbox_to_anchor=(1,0.5), title='Activity')


Out[10]:
<matplotlib.legend.Legend at 0xb7c7320>

In [ ]: