clear,clc;
xyz=load('data.txt');
x=xyz(:,1);
y=xyz(:,2);
z=xyz(:,3);
g=size(xyz)
pt=1:g(1);
figure;
plot(x,'-b.','markersize',6);
grid on;
title('X Coordinate');
xlabel('[Points]');
ylabel('[mm]');
legend('X',-1);
figure;
plot(y,'-b.','markersize',6);
grid on;
title('Y Coordinate');
xlabel('[Points]');
ylabel('[mm]');
legend('Y',-1);
figure;
plot(z,'-b.','markersize',6);
grid on;
title('Z Coordinate');
xlabel('[Points]');
ylabel('[mm]');
legend('Z',-1);
figure;
plot(x,'-b.','markersize',6);
hold on
plot(y,'-r.','markersize',6);
plot(z,'-g.','markersize',6);
hold off
grid on;
title('X,Y and Z Coordinates');
xlabel('[Points]');
ylabel('[mm]');
legend('X','Y','Z',-1);
figure;
hl1 = plot(x,'-m.','markersize',6,'Color','b');
grid on
title('X,Y and Z Coordinates');
xlabel('[Points]');
ylabel('[mm]');
hold on
plot(y,'-m.','markersize',6,'Color',[0 0.5 0])
hold off
ax1 = gca;
legend('X','Y','',-1)
ax2 = axes('Position',get(ax1,'Position'),...
    'XAxisLocation','bottom','YAxisLocation','right','Color','none',...
    'XColor','k','YColor','r');
h2 = line(pt,z,'Marker','.','Color','r','Parent',ax2) ;
legend('Z',2);
legend('boxoff');