1 function latexFig(gca, fontSize,
cbar, xtick, ytick, xticklabels, yticklabels)
3 % This sets the plotting
axis on supplied
figure to LaTeX formatted
4 % {
x,
y}tick can be used to overwrite the automatically defined tick
6 % {
x,
y}ticklabels overwrites the labels
at the positions defined
by 8 % This assumes that the Latin Modern fonts are installed
9 % Fontsize sets the
size of the text
14 %
latexFig(gca,30,1,2:2:10,1:2:10,{
'a1',
'b1',
'c1',
'd1',
'e1'},{
'a2',
'b2',
'c2',
'd2',
'e2'})
16 set(gca,
'TickLabelInterpreter',
'latex');
17 set(gca,
'DefaultTextInterpreter',
'Latex');
20 set(gca,
'FontName',
'Latin Modern Roman',
'FontSize',fontSize);
24 h=
colorbar;
set(
h,
'TickLabelInterpreter',
'latex');
28 set(gca,
'XTick',xtick);
29 set(gca,
'YTick',ytick);
33 set(gca,
'XTickLabels',xticklabels);
34 set(gca,
'YTickLabels',yticklabels);
37 %
set(gcf,
'PaperUnits',
'normalized');
38 %
set(gcf,
'PaperPosition',[0 0 1 1]);
39 %
set(gca,
'YTickLabels',{
'\fontsize{14}{0}0',
'\fontsize{14}{0}$\frac{\pi}{24}$',
'\fontsize{14}{0}$\frac{\pi}{12}$',
'\fontsize{14}{0}$\frac{\pi}{8}$',
'\fontsize{14}{0}$\frac{\pi}{6}$'})
function latexFig(gca, fontSize, cbar, xtick, ytick, xticklabels, yticklabels) % latexFig LaTeXify the plot axes % This sets the plotting axis on supplied figure to LaTeX formatted %
and extended by(Dr?) Lee James O 'Riordan. % Ek
and assumes too high and very sparse Start at
% axis([1e4 1e7 5e-18 1e-10])