I am having difficulty applying XTickLabels to a subplot. Many examples I find online do not seem to work or give errors. By moving around when the axes are defined I can get the TickLabels on a normal figure, but in a subplot the same order doesn't give labels AND messes up the other labels. Any thoughts?
%%title and labels ok, no tick labels
xlabel('x');ylabel('y');title('subplot (1,1)');axes('XTickLabel',{'a','b','c'});%%everything ok
axes('XTickLabel',{'a','b','c'});xlabel('x');ylabel('y');title('subplot (1,1)');%%title and labels ok, no tick labels on subplot1
subplot(3,3,1);xlabel('x');ylabel('y');title('subplot (1,1)');axes('XTickLabel',{'a','b','c'});subplot(3,3,2);xlabel('x');ylabel('y');title('subplot (1,2)');%%No labels for subplot 1, labels ok for subplot 2
subplot(3,3,1);axes('XTickLabel',{'a','b','c'});xlabel('x');ylabel('y');title('subplot (1,1)');subplot(3,3,2);xlabel('x');ylabel('y');title('subplot (1,2)');
Best Answer