% Load saved figures
linear=hgload('results/linear-displacement-fingervelocity.fig');
tactile=hgload('results/tactile-displacement-fingervelocity.fig');
touch=hgload('results/touch-displacement-fingervelocity.fig');
midair=hgload('results/midair-displacement-fingervelocity.fig');
% Prepare subplots
figure
h(1)=subplot(1,4,1);
h(2)=subplot(1,4,2);
h(3)=subplot(1,4,3);
h(4)=subplot(1,4,4);
%Paste figures on the subplots
%linkaxes(h);
%ylim([-0.4 0.7])
%xlim([-0.001 0.05])

copyobj(allchild(get(linear,'CurrentAxes')),h(1));
copyobj(allchild(get(tactile,'CurrentAxes')),h(2));
copyobj(allchild(get(touch,'CurrentAxes')),h(3));
copyobj(allchild(get(midair,'CurrentAxes')),h(4));
%Add legends
%l(1)=legend(h(1),'LegendForFirstFigure')
%l(2)=legend(h(2),'LegendForSecondFigure')
saveas(gcf,'results/dvs.fig');
saveas(gcf,'results/dvs.png');

% MERGING
% h(1) = c; 
%plot(c); 
% h(2) = k; 
%plot(k);
% handleLine = findobj(h,'type','line');
% hold on ;
% for i = 1 : length(handleLine)
%    plot(get(handleLine(i),'XData'), get(handleLine(i),'YData')) ;
%end