MATLAB: Do the 3D plot axis tick marks keep repeating

MATLABplot3

I am trying to create a 3D plot video, but my X axis tick marks keep repeating. The X axis tick marks should be increasing linearly. How can I fix this?
IMAGE OF PROBLEM (SEE X AXIS HAS REPEATING VALUES):
MATLAB CODE:
%% INIT WORKSPACE
clear
clc
close all
%% TEST INPUTS
x = 1:50:10^5;
y = zeros(1,length(x));
z = y;
%% INIT VIDEO
myVideo = VideoWriter('test.avi');
open(myVideo);
myFigure = figure(111);
set(myFigure, 'Position', [50 50 1000 500]);
axis 'equal'
set(gca,'ZDir','reverse')
hold on
%% ANIMATE
F = {};
for j = 1:length(x)
% Initialize Axes
cla
view(0,90); % Top (XY) View
xlim([x(1,j)-2000 x(1,j)+2000]); ylim([-100 100]); zlim([-100 100]);
xticks(0:1000:10^6); ax = gca; ax.XRuler.Exponent = 0;
grid on;
xlabel('X (ft)', 'fontweight', 'bold', 'fontsize', 13); ylabel('Y (ft)', 'fontweight', 'bold', 'fontsize', 13); zlabel('Z (ft)', 'fontweight', 'bold', 'fontsize', 13);
set(gca, 'XTickLabel',get(gca,'XTickLabel'), 'fontsize',13);
% Plot
plot3(x(1,j),y(1,j),z(1,j), 'x');
% Save Video
F{end+1} = getframe(gcf);
writeVideo(myVideo, getframe(gcf));
end
close(myVideo); % Close Video

Best Answer

Try adding
xticklabels(0:1000:10^6);
right after xticks(0:1000:10^6);