It's your code... :)
[AX,H1,H2] = plotyy(State_Time, Alt, State_Time, SV_ID, 'semilogy', 'plot');
axes(AX(1));
set(gca, 'XTickLabel',num2str(get(gca,'XTick')','%d'));
The above writes the tick labels on the LH x-axis but there's no similar statement for the RH axes object. plotyy is two completely independent axes that just are overlaid on top of each other.
There has been much discussion before on why TMW doesn't automagically hide the RH axis x-ticks so there aren't two competing sets visible but there are some disadvantages to that by itself, too.
To solve your problem either
a) set both the same way
set(AX, 'XTickLabel',num2str(get(gca,'XTick')','%d'));
or b) hide the RH ticks entirely...
set(AX(2),'xtick',[])
in which case your previous code will have the desired appearances. All in all, the best solution is probably to use the a) form almost exclusively as it will keep the two in synch. This is particularly important if you decide to do something like zoom in on an axis; then the two won't coincide at all. The alternative way to do the latter is linkaxes but it only handles the range limits, not all the rest of the properties.
Best Answer