Go to the source code of this file.
|
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 % |
|
% | latexFig (gca, 30, 1, 2:2:10, 1:2:10,{ 'a1', 'b1', 'c1', 'd1', 'e1'},{ 'a2', 'b2', 'c2', 'd2', 'e2'}) set(gca |
|
| set (gca, 'DefaultTextInterpreter', 'Latex') |
|
| set (h, 'TickLabelInterpreter', 'latex') |
|
| set (gca, 'YTick', ytick) |
|
| set (gca, 'YTickLabels', yticklabels) |
|
end % | set (gcf, 'PaperUnits', 'normalized') |
|
% | set (gcf, 'PaperPosition', [0 0 1 1]) |
|
◆ latexFig() [1/2]
function latexFig |
( |
gca |
, |
|
|
fontSize |
, |
|
|
cbar |
, |
|
|
xtick |
, |
|
|
ytick |
, |
|
|
xticklabels |
, |
|
|
yticklabels |
|
|
) |
| |
◆ latexFig() [2/2]
% latexFig |
( |
gca |
, |
|
|
30 |
, |
|
|
1 |
, |
|
|
2:2:10 |
, |
|
|
1:2:10 |
, |
|
|
{ 'a1', 'b1', 'c1', 'd1', 'e1'} |
, |
|
|
{ 'a2', 'b2', 'c2', 'd2', 'e2'} |
|
|
) |
| |
◆ set() [1/6]
set |
( |
gca |
, |
|
|
'DefaultTextInterpreter' |
, |
|
|
'Latex' |
|
|
) |
| |
◆ set() [2/6]
◆ set() [3/6]
set |
( |
gca |
, |
|
|
'YTick' |
, |
|
|
ytick |
|
|
) |
| |
◆ set() [4/6]
set |
( |
gca |
, |
|
|
'YTickLabels' |
, |
|
|
yticklabels |
|
|
) |
| |
◆ set() [5/6]
end % set |
( |
gcf |
, |
|
|
'PaperUnits' |
, |
|
|
'normalized' |
|
|
) |
| |
◆ set() [6/6]
% set |
( |
gcf |
, |
|
|
'PaperPosition' |
|
|
) |
| |
tick can be used to overwrite the automatically defined tick % locations % |
Initial value:{
x,
y}ticklabels overwrites the labels
at the positions defined
by% This assumes that the Latin Modern fonts are installed
% Fontsize sets the
size of the text
% example:
and extended by(Dr?) Lee James O 'Riordan. % Ek
and assumes too high and very sparse Start at
Definition at line 6 of file latexFig.m.
◆ cbar
◆ latex
◆ nargin
Initial value:= 2
set(gca,'FontName','Latin Modern Roman','FontSize',fontSize)
Definition at line 19 of file latexFig.m.
◆ TickLabelInterpreter