I am not sure how long it has been around, but at least in R2015b the axes objects have a 'TickLabelInterpreter'
property, which can be specified to set how the tick labels are interpreted. If you choose a LaTeX interpreter, it is possible to have multiline ticklabels quite easily by wrapping them in a tabular environment.
Example:
figure;
plot(rand(10,1));
%// Tick label with arbitrary number of lines in tabular environment
xtl = 'egin{tabular}{c} line 1 \ line 2 \ line 3\ line 4end{tabular}';
%// use the tick label at location 5 on the x axis
set(gca,'xtick', 5, 'XTickLabel', xtl, 'TickLabelInterpreter', 'latex');
Output:
Of course, the drawback here is that you need to use the LaTeX interpreter which somewhat changes the appearance of the figure. But I believe some people (such as me) actually prefer the way the LaTeX interpreted figure annotations look! As an added bonus, you can use whatever other LaTeX markup you desire (equations, etc.) in the labels.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…