I have the following box plots, which compares the time diffs. The data is collected from two different devices, which measure accelerometer data. I have done this analysis to compare the sampling frequencies.
The code is given here:
#calculate time delta and do a box plot
# array values multiplied by 1000 to convert to ms
timedelta1 = np.diff(time1)*1000
timedelta2 = np.diff(time2)*1000
# array values in seconds
timedelta1_sec = np.diff(time1)
timedelta2_sec = np.diff(time2)
plt.subplots(figsize=(15,8))
plt.subplot(1, 2, 1)
plt.ylabel('$\Delta t$ in ms', fontsize=20)
plt.title('Delta sampling times $\\vec{{\\Delta t}}$', fontsize=20)
dict_boxplot_timediff = plt.boxplot([timedelta1, timedelta2],
labels=[f'Device 1\n'
# f'{file1}\n'
f'$\O \\vec{{\\Delta t}}$: {np.mean(timedelta1):.2f} ± {np.std(timedelta1):.2f} ms\n'
f'Median $\\vec{{\\Delta t}}$: {np.median(timedelta1):.2f} ms \n'
f'$\O f$: {1/np.mean(timedelta1_sec):.2f} Hz\n',
f'Device 2\n'
# f'{file2} \n'
f'$\O \\vec{{\\Delta t}}$: {np.mean(timedelta2):.2f} ± {np.std(timedelta2):.2f} ms\n'
f'Median $\\vec{{\\Delta t}}$: {np.median(timedelta2):.2f} ms\n'
f'$\O f$: {1/np.mean(timedelta2_sec):.2f} Hz\n'],
meanline=True,
showmeans=True)
What methods exist so that I can have a better visualisation for the box plot on the right?