I am trying to change the font size of Xticklabel by this code
a = get(gca,'XTickLabel');
in a figure where I have 6 subplots and I do this for each subplot separately. However when I get my figure the order of the numbers on the axis are wrong, for example on X axis it shows: [0 500 1000 0 500 1000]. I realized that sometimes if I only set one axis (either X or Y) it would automatically apply on both axis and I don't get this error. But I tried that on each subplot and still doesn't work.
Could you please help me what I can do to solve this issue?