# -*- coding: utf-8 -*-
"""
Created on Thu Apr  5 16:19:31 2018

@author: z5030440
"""

d_gt = {'arr':sl_gt}
d_sds = {'arr':sl_sds}

sio.savemat('sl_gt.mat', mdict=d_gt)
sio.savemat('sl_sds.mat', mdict=d_sds)

#%%

herror = sio.loadmat('hor_error.mat')

diff_p = (herror['gt_av'] - herror['sds_av'])[0,:]

f = plt.figure()
plt.subplot(3,1,1)
plt.bar(np.linspace(1,len(zav),len(zav)), herror['p_rmse'][0])
plt.ylabel('rmse [m]')
plt.xticks([])
plt.title('Horizontal cross-shore error')

plt.subplot(3,1,2)
plt.bar(np.linspace(1,len(zav),len(zav)), herror['p_mean'][0], color=orange)
plt.ylabel('mean [m]')
plt.xticks([])

plt.subplot(3,1,3)
plt.bar(np.linspace(1,len(zav),len(zav)), herror['p_std'][0], color='g')
plt.ylabel('std [m]')
plt.xlabel('comparison #')
plt.grid(False)
plt.grid(axis='y')
f.subplots_adjust(hspace=0.2)
plt.draw()
