The ability to make the Xtick labels and Ytick labels utilize the same font as TEXT objects with LaTeX as their interpreter is not available in MATLAB 8.1 (R2013a).
To workaround this issue create a TEXT object for each individual label as the following example illustrates:
close all;
plot(1:10);
set(gca,'yticklabel',[], 'xticklabel', [])
yTicks = get(gca,'ytick');
xTicks = get(gca, 'xtick');
ax = axis;
HorizontalOffset = 0.1;
for i = 1:length(yTicks)
text(ax(1) - HorizontalOffset,yTicks(i),['$' num2str( yTicks(i)) '$'],...
'HorizontalAlignment','Right','interpreter', 'latex');
end
minY = min(yTicks);
verticalOffset = 0.2;
for xx = 1:length(xTicks)
text(xTicks(xx), minY - verticalOffset, ['$' num2str( xTicks(xx)) '$'],...
'HorizontalAlignment','Right','interpreter', 'latex');
end
Please be aware that when using this workaround for subplots, each time a new axes is added to the figure window, there may be a small shift in positioning of the axes. It is likely necessary to add the text object after all the subplots have been rendered.
Best Answer