I think that part of the problem is that when the code calls axes or xlabel it applies the ticks or labels to the current axis which may not be the one corresponding to your subplot. I took the middle chunk of code from above (starting at %% title and labels ok, no tick labels on subplot1) and put it in a test.m file and stepped through each line and observed the changes to the subplots as the line was executed. It may be interesting to do the same.
Now in order to apply the ticks and labels to your choice of subplot, you need the handle to the axis of that subplot. That is easy:
Then to set the title, labels and ticks, do something like
title(h,'subplot (1,1)');
xlabel(h,'x');
ylabel(h,'y');
set(h,'XTickLabel',{'a','b','c'});
And repeat for the other subplots. Try the above and see what happens!
Best Answer