function figureMSD(filename1,filename2,filename3,filename_fig,skala_czasu,D_x,D_y,D_t,axis1,pion,poz1,poz2,poz3)

load(filename1,'MSD')
load(filename2,'MSD2')
load(filename3,'MSD3')

t=linspace(skala_czasu,numel(MSD)*skala_czasu,numel(MSD));
loglog(t,MSD,'b-*','LineWidth',0.5);
hold on;
loglog(t,MSD2,'g-*','LineWidth',0.5);
hold on 
loglog(t,MSD3,'r-*','LineWidth',0.5);
hold on;
%Legend
hleg1 = legend('x','y','angle');
set(hleg1,'Location','NorthWest')
set(hleg1,'Interpreter','none')

% Set the axis limits
axis(axis1);
% Labels
xlabel('\tau(s)', 'FontSize', 14);
ylabel('MSD ({\mu}m^2 or rad^2)', 'FontSize', 14);

% Title
TeXString = texlabel('MSD(tau) = <{Delta}r(tau)^2> = <[r(t+tau)-r(t)]^2>');
title(TeXString);

% Text
text(pion,poz1,texlabel(D_x));
text(pion,poz2,texlabel(D_y));
text(pion,poz3,texlabel(D_t));

% Save
set(gcf,'PaperPosition',[0.5 0.5 10 10]);

print('-dtiff','-r1200',filename_fig);